Moving material during laser fabrication

ABSTRACT

A moveable head of a computer numerically controlled machine may deliver electromagnetic energy sufficient to cause a first change in a material at least partially contained within an interior space of the CNC machine. A feature of the material may be imaged using at least one camera present inside the interior space to update a position of the material, and the moveable head may be aligned to deliver electromagnetic energy sufficient to cause a second change in the material such that the second change is positioned on the material consistent with the first change and with an intended final appearance of the material. Methods, systems, and article of manufacture are described.

CROSS-REFERENCE TO RELATED APPLICATIONS

The current application claims priority to U.S. Provisional PatentApplication No. 62/115,562 filed Feb. 12, 2015; U.S. Provisional PatentApplication No. 62/115,571 filed Feb. 12, 2015; U.S. Provisional PatentApplication No. 62/222,756 filed Sep. 23, 2015; U.S. Provisional PatentApplication No. 62/222,757 filed Sep. 23, 2015; and U.S. ProvisionalPatent Application No. 62/222,758 filed Sep. 23, 2015. The writtendescription, claims, and drawings of all of the aforementionedapplications are incorporated herein by reference.

TECHNICAL FIELD

The subject matter described herein relates to manufacturing processesimplementing, or aided by, machine vision and incorporating movingmaterial inside the manufacturing machine.

BACKGROUND

Manufacturing systems, such as “3-D” printers, laser cutters, CNCmachines, and the like, can be used to create complicated items wheretraditional manufacturing techniques like moldings or manual assemblyfail. Such automated methods receive instructions that specify the cuts,layers, patterns, etc. before a machine begins construction. Theinstructions can be in the form of computer files transferred to thememory of a computer controller for the machine and interpreted atrun-time to provide a series of steps in the manufacturing process.

SUMMARY

In one aspect, a method delivers, via a moveable head of a computernumerically controlled machine, electromagnetic energy sufficient tocause a first change in a material partially contained within aninterior space of the computer numerically controlled machine. A featureof the material is imaged using at least one camera present inside theinterior space to update a position of the material. The movable head isaligned to deliver electromagnetic energy sufficient to cause a secondchange in the material such that the second change is positioned on thematerial consistent with the first change and with an intended finalappearance of the material.

In a second aspect, a computer numerically controlled machine includes amoveable head inside an interior space of the computer numericallycontrolled machine, where the moveable head is configured to deliverelectromagnetic energy. There is a camera present inside the interiorspace. There is a controller configured to perform operations including:causing the moveable head to deliver first electromagnetic energysufficient to cause a first change in a material at least partiallycontained within the interior space, commanding the camera to image afeature of the material to update a position of the material, andcausing alignment of the moveable head to deliver electromagnetic energysufficient to cause a second change in the material such that the secondchange is positioned on the material consistent with the first changeand with an intended final appearance of the material.

In some variations one or more of the following features can optionallybe included in any feasible combination. The feature can include thefirst change, an aspect of an appearance of the material prior to thefirst change, a corner of, a hole in, and/or an edge of the material, afiducial mark made on the material.

The camera can include a camera mounted on the moveable head, a cameranot mounted on the moveable head, a camera mounted on an openablebarrier of a housing that at least partially defines the interior space.

It can be determined that, based on information from the camera, that anadditional image of the material should be captured. The material can beimaged a second time to capture the at least one additional image.

The different position can result from an intentional movement of thematerial by a user and/or a device associated with the computernumerically controlled machine. The different position can result froman unintentional movement of the material.

It can be determined that the unintentional movement may have occurredbased on data from sensors of the computer numerically controlledmachine.

The material can be moved through a pass-through slot in a housing thatat least partially defines the interior volume.

The camera can include a first camera and a second camera, where theimaging includes moving the second camera to facilitate further imagingof the material based information from an image produced by the firstcamera. The image can include a view of the feature, and the furtherimaging includes generating a higher-resolution image and/or closer-upimage of the feature. The feature can include a corner of the material.The first camera can be mounted on an openable barrier of a housing thatpartially defines the interior space, and the second camera is mountedon the moveable head.

Implementations of the current subject matter can include, but are notlimited to, methods consistent with the descriptions provided herein aswell as articles that comprise a tangibly embodied machine-readablemedium operable to cause one or more machines (e.g., computers, etc.) toresult in operations implementing one or more of the described features.Similarly, computer systems are also described that may include one ormore processors and one or more memories coupled to the one or moreprocessors. A memory, which can include a computer-readable storagemedium, may include, encode, store, or the like one or more programsthat cause one or more processors to perform one or more of theoperations described herein. Computer implemented methods consistentwith one or more implementations of the current subject matter can beimplemented by one or more data processors residing in a singlecomputing system or multiple computing systems. Such multiple computingsystems can be connected and can exchange data and/or commands or otherinstructions or the like via one or more connections, including but notlimited to a connection over a network (e.g. the Internet, a wirelesswide area network, a local area network, a wide area network, a wirednetwork, or the like), via a direct connection between one or more ofthe multiple computing systems, etc.

DESCRIPTION OF DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of this specification, show certain aspects of the subject matterdisclosed herein and, together with the description, help explain someof the principles associated with the disclosed implementations. In thedrawings,

FIG. 1 is an elevational view of a CNC machine with a camera positionedto capture an image of the entire material bed and another camerapositioned to capture an image of a portion of the material bed,consistent with some implementations of the current subject matter;

FIG. 2 is a top view of the implementation of the CNC machine shown inFIG. 1;

FIG. 3A is a diagram illustrating one example of an SVG source file,consistent with some implementations of the current subject matter;

FIG. 3B is an example of a graphical representation of the cut path inthe CNC machine, consistent with some implementations of the currentsubject matter;

FIG. 3C is a diagram illustrating the machine file corresponding to thecut path and the source file, consistent with some implementations ofthe current subject matter;

FIG. 4A is a diagram illustrating the addition of images, consistentwith some implementations of the current subject matter;

FIG. 4B is a diagram illustrating the subtraction of images, consistentwith some implementations of the current subject matter;

FIG. 4C is a diagram illustrating the differencing of images to isolatea simulated internal lighting effect, consistent with someimplementations of the current subject matter;

FIG. 5 is a diagram illustrating a camera providing high-resolutionimages of the material in a CNC machine, consistent with someimplementations of the current subject matter;

FIG. 6 is a diagram illustrating fans integrated into the head,consistent with some implementations of the current subject matter;

FIG. 7 is a diagram illustrating a top view of the CNC machine having alaser and the head both mounted on a gantry, consistent with someimplementations of the current subject matter.

FIG. 8 is a diagram illustrating a sealed optical system, consistentwith some implementations of the current subject matter;

FIG. 9 is an end sectional view illustrating bumpers aligning the laserwith a housing, consistent with some implementations of the currentsubject matter;

FIG. 10 is a top sectional view of the laser offset by the bumpers fromthe center of the housing, consistent with some implementations of thecurrent subject matter;

FIG. 11 is a top sectional view of the bumpers aligning the laser withan aperture in a misaligned housing, consistent with someimplementations of the current subject matter;

FIG. 12 is a front sectional view of an angularly adjustable turningsystem, consistent with some implementations of the current subjectmatter;

FIG. 13 is a front sectional view of a cantilevered angularly adjustableturning system, consistent with some implementations of the currentsubject matter;

FIG. 14 is a perspective view of a second cantilevered angularlyadjustable turning system, consistent with some implementations of thecurrent subject matter;

FIG. 15 is a diagram illustrating the determination of materialthickness by the lid camera imaging a spot on the material produced by adistance-finding light source, consistent with some implementations ofthe current subject matter;

FIG. 16 is a diagram illustrating determination material thickness byimaging a laser spot size, consistent with some implementations of thecurrent subject matter;

FIG. 17 is a diagram illustrating a camera imaging details of a cut madeby the CNC machine, consistent with some implementations of the currentsubject matter;

FIG. 18 is a diagram illustrating the lid camera imaging registrationmarks on an oversized material, consistent with some implementations ofthe current subject matter;

FIG. 19 is a diagram illustrating imaging features of the material toimplement double sided cutting, consistent with some implementations ofthe current subject matter;

FIG. 20 is a diagram illustrating referencing the imaged features of thematerial to complete a double-sided cut, consistent with someimplementations of the current subject matter;

FIG. 21 is a diagram illustrating varying cut depths to generate a colorpattern in a multi-layered material; and

FIG. 22 is a process flow chart illustrating features of a methodconsistent with implementations of the current subject matter.

When practical, similar reference numbers denote similar structures,features, or elements.

DETAILED DESCRIPTION

The details of one or more variations of the subject matter describedherein are set forth in the accompanying drawings and the descriptionbelow. Other features and advantages of the subject matter describedherein will be apparent from the description and drawings, and from theclaims. While certain features of the currently disclosed subject mattermay be described for illustrative purposes in relation to usingmachine-vision for aiding automated manufacturing processes (e.g. a CNCprocess), it should be readily understood that such features are notintended to be limiting.

As used herein, the term “cutting” can generally refer to altering theappearance, properties, and/or state of a material. Cutting can include,for example, making a through-cut, engraving, bleaching, curing,burning, etc. Engraving, when specifically referred to herein, indicatesa process by which a CNC machine modifies the appearance of the materialwithout fully penetrating it. For example, in the context of a lasercutter, it can mean removing some of the material from the surface, ordiscoloring the material e.g. through an application of focusedelectromagnetic radiation delivering electromagnetic energy as describedbelow.

As used herein, the term “laser” includes any electromagnetic radiationor focused or coherent energy source that (in the context of being acutting tool) uses photons to modify a substrate or cause some change oralteration upon a material impacted by the photons. Lasers (whethercutting tools or diagnostic) can be of any desired wavelength, includingfor example, microwave, lasers, infrared lasers, visible lasers, UVlasers, X-ray lasers, gamma-ray lasers, or the like.

Also, as used herein, “cameras” includes, for example, visible lightcameras, black and white cameras, IR or UV sensitive cameras, individualbrightness sensors such as photodiodes, sensitive photon detectors suchas a photomultiplier tube or avalanche photodiodes, detectors ofinfrared radiation far from the visible spectrum such as microwaves,X-rays, or gamma rays, optically filtered detectors, spectrometers, andother detectors that can include sources providing electromagneticradiation for illumination to assist with acquisition, for example,flashes, UV lighting, etc.

Also, as used herein, reference to “real-time” actions includes somedegree of delay or latency, either programmed intentionally into theactions or as a result of the limitations of machine response and/ordata transmission. “Real-time” actions, as used herein, are intended toonly approximate an instantaneous response, or a response performed asquickly as possible given the limits of the system, and do not imply anyspecific numeric or functional limitation to response times or themachine actions resulting therefrom.

Also, as used herein, unless otherwise specified, the term “material” isthe material that is on the bed of the CNC machine. For example, if theCNC machine is a laser cutter, lathe, or milling machine, the materialis what is placed in the CNC machine to be cut, for example, the rawmaterials, stock, or the like. In another example, if the CNC machine isa 3-D printer, then the material is either the current layer, orpreviously existent layers or substrate, of an object being crafted bythe 3-D printing process. In yet another example, if the CNC machine isa printer, then the material can be the paper onto which the CNC machinedeposits ink.

Introduction

A computer numerical controlled (CNC) machine is a machine that is usedto add or remove material under the control of a computer. There can beone or more motors or other actuators that move one or more heads thatperform the adding or removing of material. For CNC machines that addmaterial, heads can incorporate nozzles that spray or release polymersas in a typical 3D printer. In some implementations, the heads caninclude an ink source such as a cartridge or pen. In the case of 3-Dprinting, material can be built up layer by layer until a fully realized3D object has been created. In some implementations, the CNC machine canscan the surface of a material such as a solid, a liquid, or a powder,with a laser to harden or otherwise change the material properties ofsaid material. New material may be deposited. The process can berepeated to build successive layers. For CNC machines that removematerial, the heads can incorporate tools such as blades on a lathe,drag knives, plasma cutters, water jets, bits for a milling machine, alaser for a laser cutter/engraver, etc.

FIG. 1 is an elevational view of a CNC machine 100 with a camerapositioned to capture an image of an entire material bed 150 and anothercamera positioned to capture an image of a portion of the material bed150, consistent with some implementations of the current subject matter.FIG. 2 is a top view of the implementation of the CNC machine 100 shownin FIG. 1.

The CNC machine 100 shown in FIG. 1 corresponds to one implementation ofa laser cutter. While some features are described in the context of alaser cutter, this is by no means intended to be limiting. Many of thefeatures described below can be implemented with other types of CNCmachines. The CNC machine 100 can be, for example, a lathe, engraver,3D-printer, milling machine, drill press, saw, etc.

While laser cutter/engravers share some common features with CNCmachines, they have many differences and present particularlychallenging design constraints. A laser cutter/engraver is subject toregulatory guidelines that restrict the egress of electromagneticradiation from the unit when operating, making it challenging for lightto enter or escape the unit safely, for example to view or record animage of the contents. The beam of a laser cutter/engraver must berouted from the emitter to the area to be machined, potentiallyrequiring a series of optical elements such as lenses and mirrors. Thebeam of a laser cutter/engraver is easily misdirected, with a smallangular deflection of any component relating to the beam pathpotentially resulting in the beam escaping the intended path,potentially with undesirable consequences. A laser beam may be capableof causing material destruction if uncontrolled. A laser cutter/engravermay require high voltage and/or radio frequency power supplies to drivethe laser itself. Liquid cooling is common in laser cutter/engravers tocool the laser, requiring fluid flow considerations. Airflow isimportant in laser cutter/engraver designs, as air may becomecontaminated with byproducts of the laser's interaction with thematerial such as smoke, which may in turn damage portions of the machinefor example fouling optical systems. The air exhausted from the machinemay contain undesirable byproducts such as smoke that must be routed orfiltered, and the machine may need to be designed to prevent suchbyproducts from escaping through an unintended opening, for example bysealing components that may be opened. Unlike most machining tools, thekerf—the amount of material removed during the operation—is both smalland variable depending on the material being processed, the power of thelaser, the speed of the laser, and other factors, making it difficult topredict the final size of the object. Also unlike most machining tools,the output of the laser cutter/engraver is very highly dependent on thespeed of operation; a momentary slowing can destroy the workpiece bydepositing too much laser energy. In many machining tools, operatingparameters such as tool rotational speed and volume of material removedare easy to continuously predict, measure, and calculate, while lasercutter/engravers are more sensitive to material and other conditions. Inmany machining tools, fluids are used as coolant and lubricant; in lasercutter/engravers, the cutting mechanism does not require physicalcontact with the material being affected, and air or other gasses may beused to aid the cutting process in a different manner, by facilitatingcombustion or clearing debris, for example.

The CNC machine 100 can have a housing surrounding an enclosure orinterior area defined by the housing. The housing can include walls, abottom, and one or more openings to allow access to the CNC machine 100,etc. There can be a material bed 150 that can include a top surface onwhich the material 140 generally rests.

In the implementation of FIG. 1, the CNC machine can also include anopenable barrier as part of the housing to allow access between anexterior of the CNC machine and an interior space of the CNC machine.The openable barrier can include, for example, one or more doors,hatches, flaps, and the like that can actuate between an open positionand a closed position. The openable barrier can attenuate thetransmission of light between the interior space and the exterior whenin a closed position. Optionally, the openable barrier can betransparent to one or more wavelengths of light or be comprised ofportions of varying light attenuation ability. One type of openablebarrier can be a lid 130 that can be opened or closed to put material140 on the material bed 150 on the bottom of the enclosure. Variousexample implementations discussed herein include reference to a lid. Itwill be understood that absent explicit disclaimers of other possibleconfigurations of the operable barrier or some other reason why a lidcannot be interpreted generically to mean any kind of openable barrier,the use of the term lid is not intended to be limiting. One example ofan openable barrier can be a front door that is normally vertical whenin the closed position and can open horizontally or vertically to allowadditional access. There can also be vents, ducts, or other accesspoints to the interior space or to components of the CNC machine 100.These access points can be for access to power, air, water, data, etc.Any of these access points can be monitored by cameras, positionsensors, switches, etc. If they are accessed unexpectedly, the CNCmachine 100 can execute actions to maintain the safety of the user andthe system, for example, a controlled shutdown. In otherimplementations, the CNC machine 100 can be completely open (i.e. nothaving a lid 130, or walls). Any of the features described herein canalso be present in an open configuration, where applicable.

As described above, the CNC machine 100 can have one or more movableheads that can be operated to alter the material 140. In someimplementations, for example the implementation of FIG. 1, the movablehead can be the head 160. There may be multiple movable heads, forexample two or more mirrors that separately translate or rotate in ableto locate a laser beam, or multiple movable heads that operateindependently, for example two mill bits in a CNC machine capable ofseparate operation, or any combination thereof. In the case of alaser-cutter CNC machine, the head 160 can include optical components,mirrors, cameras, and other electronic components used to perform thedesired machining operations. Again, as used herein, the head 160typically is a laser-cutting head, but can be a movable head of anytype.

The head 160, in some implementations, can be configured to include acombination of optics, electronics, and mechanical systems that can, inresponse to commands, cause a laser beam or electromagnetic radiation tobe delivered to cut or engrave the material 140. The CNC machine 100 canalso execute operation of a motion plan for causing movement of themovable head. As the movable head moves, the movable head can deliverelectromagnetic energy to effect a change in the material 140 that is atleast partially contained within the interior space. In oneimplementation, the position and orientation of the optical elementsinside the head 160 can be varied to adjust the position, angle, orfocal point of a laser beam. For example, mirrors can be shifted orrotated, lenses translated, etc. The head 160 can be mounted on atranslation rail 170 that is used to move the head 160 throughout theenclosure. In some implementations the motion of the head can be linear,for example on an X axis, a Y axis, or a Z axis. In otherimplementations, the head can combine motions along any combination ofdirections in a rectilinear, cylindrical, or spherical coordinatesystem.

A working area for the CNC machine 100 can be defined by the limitswithin which the movable head can cause delivery of a machining action,or delivery of a machining medium, for example electromagnetic energy.The working area can be inside the interior space defined by thehousing. It should be understood that the working area can be agenerally three-dimensional volume and not a fixed surface. For example,if the range of travel of a vertically oriented laser cutter is a10″×10″ square entirely over the material bed 150, and the laser fromthe laser beam comes out of the laser cutter at a height of 4″ above thematerial bed of the CNC machine, that 400 in² volume can be consideredto be the working area. Restated, the working area can be defined by theextents of positions in which material 140 can be worked by the CNCmachine 100, and not necessarily tied or limited by the travel of anyone component. For example, if the head 160 could turn at an angle, thenthe working area could extend in some direction beyond the travel of thehead 160. By this definition, the working area can also include anysurface, or portion thereof, of any material 140 placed in the CNCmachine 100 that is at least partially within the working area, if thatsurface can be worked by the CNC machine 100. Similarly, for oversizedmaterial, which may extend even outside the CNC machine 100, only partof the material 140 might be in the working area at any one time.

The translation rail 170 can be any sort of translating mechanism thatenables movement of the head 160 in the X-Y direction, for example asingle rail with a motor that slides the head 160 along the translationrail 170, a combination of two rails that move the head 160, acombination of circular plates and rails, a robotic arm with joints,etc.

Components of the CNC machine 100 can be substantially enclosed in acase or other enclosure. The case can include, for example, windows,apertures, flanges, footings, vents, etc. The case can also contain, forexample, a laser, the head 160, optical turning systems, cameras, thematerial bed 150, etc. To manufacture the case, or any of itsconstituent parts, an injection-molding process can be performed. Theinjection-molding process can be performed to create a rigid case in anumber of designs. The injection molding process may utilize materialswith useful properties, such as strengthening additives that enable theinjection molded case to retain its shape when heated, or absorptive orreflective elements, coated on the surface or dispersed throughout thematerial for example, that dissipate or shield the case from laserenergy. As an example, one design for the case can include a horizontalslot in the front of the case and a corresponding horizontal slot in therear of the case. These slots can allow oversized material to be passedthrough the CNC machine 100.

Optionally, there can be an interlock system that interfaces with, forexample, the openable barrier, the lid 130, door, and the like. Such aninterlock is required by many regulatory regimes under manycircumstances. The interlock can then detect a state of opening of theopenable barrier, for example, whether a lid 130 is open or closed. Insome implementations, an interlock can prevent some or all functions ofthe CNC machine 100 while an openable barrier, for example the lid 130,is in the open state (e.g. not in a closed state). The reverse can betrue as well, meaning that some functions of the CNC machine 100 can beprevented while in a closed state. There can also be interlocks inseries where, for example, the CNC machine 100 will not operate unlessboth the lid 130 and the front door are both closed. Furthermore, somecomponents of the CNC machine 100 can be tied to states of othercomponents of the CNC machine, such as not allowing the lid 130 to openwhile the laser is on, a movable component moving, a motor running,sensors detecting a certain gas, etc. In some implementations, theinterlock can prevent emission of electromagnetic energy from themovable head when detecting that the openable barrier is not in theclosed position.

Converting Source Files to Motion Plans

A traditional CNC machine accepts a user drawing, acting as a sourcefile that describes the object the user wants to create or the cuts thata user wishes to make. Examples of source files are:

1) .STL files that define a three-dimensional object that can befabricated with a 3D printer or carved with a milling machine,

2) .SVG files that define a set of vector shapes that can be used to cutor draw on material,

3) .JPG files that define a bitmap that can be engraved on a surface,and

4) CAD files or other drawing files that can be interpreted to describethe object or operations similarly to any of the examples above.

FIG. 3A is a diagram illustrating one example of an SVG source file 310,consistent with some implementations of the current subject matter. FIG.3B is an example of a graphical representation 320 of the cut path 330in the CNC machine, consistent with some implementations of the currentsubject matter. FIG. 3C is a diagram illustrating the machine file 340that would result in a machine creating the cut path 330, created fromthe source file 310, consistent with some implementations of the currentsubject matter. The example source file 310 represents a work surfacethat is 640×480 units with a 300×150 unit rectangle whose top leftcorner is located 100 units to the right and 100 units down from thetop-left corner of the work surface. A computer program can then convertthe source file 310 into a machine file 340 that can be interpreted bythe CNC machine 100 to take the actions illustrated in FIG. 3B. Theconversion can take place on a local computer where the source filesreside on the CNC machine 100, etc.

The machine file 340 describes the idealized motion of the CNC machine100 to achieve the desired outcome. Take, for example, a 3D printer thatdeposits a tube-shaped string of plastic material. If the source filespecifies a rectangle then the machine file can instruct the CNC machineto move along a snakelike path that forms a filled in rectangle, whileextruding plastic. The machine file can omit some information, as well.For example, the height of the rectangle may no longer be directlypresent in the machine file; the height will be as tall as the plastictube is high. The machine file can also add some information. Forexample, the instruction to move the print head from its home positionto a corner of the rectangle to begin printing. The instructions caneven depart from the directly expressed intent of the user. A commonsetting in 3D printers, for example, causes solid shapes to be renderedas hollow in the machine file to save on material cost.

As shown by the example of FIGS. 3A-C, the conversion of the source file310 to the machine file 330 can cause the CNC machine to move thecutting tool from (0,0) (in FIG. 3B) to the point at which cutting is tobegin, activate the cutting tool (for example lower a drag knife orenergize a laser), trace the rectangle, deactivate the cutting tool, andreturn to (0,0).

Once the machine file has been created, a motion plan for the CNCmachine 100 can be generated. The motion plan contains the data thatdetermines the actions of components of the CNC machine 100 at differentpoints in time. The motion plan can be generated on the CNC machine 100itself or by another computing system. A motion plan can be a stream ofdata that describes, for example, electrical pulses that indicateexactly how motors should turn, a voltage that indicates the desiredoutput power of a laser, a pulse train that specifies the rotationalspeed of a mill bit, etc. Unlike the source files and the machine filessuch as G-code, motion plans are defined by the presence of a temporalelement, either explicit or inferred, indicating the time or time offsetat which each action should occur. This allows for one of the keyfunctions of a motion plan, coordinated motion, wherein multipleactuators coordinate to have a single, pre-planned affect.

The motion plan renders the abstract, idealized machine file as apractical series of electrical and mechanical tasks. For example, amachine file might include the instruction to “move one inch to theright at a speed of one inch per second, while maintaining a constantnumber of revolutions per second of a cutting tool.” The motion planmust take into consideration that the motors cannot accelerateinstantly, and instead must “spin up” at the start of motion and “spindown” at the end of motion. The motion plan would then specify pulses(e.g. sent to stepper motors or other apparatus for moving the head orother parts of a CNC machine) occurring slowly at first, then faster,then more slowly again near the end of the motion.

The machine file is converted to the motion plan by the motioncontroller/planner. Physically, the motion controller can be a generalor special purpose computing device, such as a high performancemicrocontroller or single board computer coupled to a Digital SignalProcessor (DSP). The job of the motion controller is to take the vectormachine code and convert it into electrical signals that will be used todrive the motors on the CNC machine 100, taking in to account the exactstate of the CNC machine 100 at that moment (e.g. “since the machine isnot yet moving, maximum torque must be applied, and the resulting changein speed will be small”) and physical limitations of the machine (e.g.accelerate to such-and-such speed, without generating forces in excessof those allowed by the machine's design). The signals can be step anddirection pulses fed to stepper motors or location signals fed toservomotors among other possibilities, which create the motion andactions of the CNC machine 100, including the operation of elements likeactuation of the head 160, moderation of heating and cooling, and otheroperations. In some implementations, a compressed file of electricalsignals can be decompressed and then directly output to the motors.These electrical signals can include binary instructions similar to 1'sand 0's to indicate the electrical power that is applied to each inputof each motor over time to effect the desired motion.

In the most common implementation, the motion plan is the only stagethat understands the detailed physics of the CNC machine 100 itself, andtranslates the idealized machine file into implementable steps. Forexample, a particular CNC machine 100 might have a heavier head, andrequire more gradual acceleration. This limitation is modeled in themotion planner and affects the motion plan. Each model of CNC machinecan require precise tuning of the motion plan based on its measuredattributes (e.g. motor torque) and observed behavior (e.g. belt skipswhen accelerating too quickly). The CNC machine 100 can also tune themotion plan on a per-machine basis to account for variations from CNCmachine to CNC machine.

The motion plan can be generated and fed to the output devices inreal-time, or nearly so. The motion plan can also be pre-computed andwritten to a file instead of streamed to a CNC machine, and then readback from the file and transmitted to the CNC machine 100 at a latertime. Transmission of instructions to the CNC machine 100, for example,portions of the machine file or motion plan, can be streamed as a wholeor in batches from the computing system storing the motion plan. Batchescan be stored and managed separately, allowing pre-computation oradditional optimization to be performed on only part of the motion plan.In some implementations, a file of electrical signals, which may becompressed to preserve space and decompressed to facilitate use, can bedirectly output to the motors. The electrical signals can include binaryinstructions similar to 1's and 0's to indicate actuation of the motor.

The motion plan can be augmented, either by precomputing in advance orupdating in real-time, with the aid of machine vision. Machine vision isa general term that describes the use of sensor data, and not onlylimited to optical data, in order to provide additional input to machineoperation. Other forms of input can include, for example, audio datafrom an on-board sound sensor such as a microphone, orposition/acceleration/vibration data from an on-board sensor such as agyroscope or accelerometer. Machine vision can be implemented by usingcameras to provide images of, for example, the CNC machine 100, thematerial being operated on by the CNC machine, the environment of theCNC machine 100 (if there is debris accumulating or smoke present), orany combination of these. These cameras can then route their output to acomputer for processing. By viewing the CNC machine 100 in operation andanalyzing the image data it can, for example, be determined if the CNCmachine 100 is working correctly, if the CNC machine 100 is performingoptimally, the current status of the CNC machine 100 or subcomponents ofthe CNC machine 100, etc. Similarly, the material can be imaged and, forexample, the operation of the CNC machine 100 can be adjusted accordingto instructions, users can be notified when the project is complete, orinformation about the material can be determined from the image data.Error conditions can be identified, such as if a foreign body has beeninadvertently left in the CNC machine 100, the material has beeninadequately secured, or the material is reacting in an unexpected wayduring machining.

Camera Systems

Cameras can be mounted inside the CNC machine 100 to acquire image dataduring operation of the CNC machine 100. Image data refers to all datagathered from a camera or image sensor, including still images, streamsof images, video, audio, metadata such as shutter speed and aperturesettings, settings or data from or pertaining to a flash or otherauxiliary information, graphic overlays of data superimposed upon theimage such as GPS coordinates, in any format, including but not limitedto raw sensor data such as a .DNG file, processed image data such as aJPG file, and data resulting from the analysis of image data processedon the camera unit such as direction and velocity from an optical mousesensor. For example, there can be cameras mounted such that they gatherimage data from (also referred to as ‘view’ or ‘image’) an interiorportion of the CNC machine 100. The viewing can occur when the lid 130is in a closed position or in an open position or independently of theposition of the lid 130. In one implementation, one or more cameras, forexample a camera mounted to the interior surface of the lid 130 orelsewhere within the case or enclosure, can view the interior portionwhen the lid 130 to the CNC machine 100 is a closed position. Inparticular, in some preferred embodiments, the cameras can image thematerial 140 while the CNC machine 100 is closed and, for example, whilemachining the material 140. In some implementations, cameras can bemounted within the interior space and opposite the working area. Inother implementations, there can be a single camera or multiple camerasattached to the lid 130. Cameras can also be capable of motion such astranslation to a plurality of positions, rotation, and/or tilting alongone or more axes. One or more cameras mounted to a translatable support,such as a gantry 210, which can be any mechanical system that can becommanded to move (movement being understood to include rotation) thecamera or a mechanism such as a mirror that can redirect the view of thecamera, to different locations and view different regions of the CNCmachine. The head 160 is a special case of the translatable support,where the head 160 is limited by the track 220 and the translation rail170 that constrain its motion.

Lenses can be chosen for wide angle coverage, for extreme depth of fieldso that both near and far objects may be in focus, or many otherconsiderations. The cameras may be placed to additionally capture theuser so as to document the building process, or placed in a locationwhere the user can move the camera, for example on the underside of thelid 130 where opening the CNC machine 100 causes the camera to point atthe user. Here, for example, the single camera described above can takean image when the lid is not in the closed position. Such an image caninclude an object, such as a user, that is outside the CNC machine 100.Cameras can be mounted on movable locations like the head 160 or lid 130with the intention of using video or multiple still images taken whilethe camera is moving to assemble a larger image, for example scanningthe camera across the material 140 to get an image of the material 140in its totality so that the analysis of image data may span more thanone image.

As shown in FIG. 1, a lid camera 110, or multiple lid cameras, can bemounted to the lid 130. In particular, as shown in FIG. 1, the lidcamera 110 can be mounted to the underside of the lid 130. The lidcamera 110 can be a camera with a wide field of view 112 that can imagea first portion of the material 140. This can include a large fractionof the material 140 and the material bed or even all of the material 140and material bed 150. The lid camera 110 can also image the position ofthe head 160, if the head 160 is within the field of view of the lidcamera 110. Mounting the lid camera 110 on the underside of the lid 130allows for the user to be in view when the lid 130 is open. This can,for example, provide images of the user loading or unloading thematerial 140, or retrieving a finished project. Here, a number ofsub-images, possibly acquired at a number of different locations, can beassembled, potentially along with other data like a source file such asan SVG or digitally rendered text, to provide a final image. When thelid 130 is closed, the lid camera 110 rotates down with the lid 130 andbrings the material 140 into view.

Also as shown in FIG. 1, a head camera 120 can be mounted to the head160. The head camera 120 can have a narrower field of view 122 and takehigher resolution images of a smaller area, of the material 140 and thematerial bed, than the lid camera 110. One use of the head camera 120can be to image the cut made in the material 140. The head camera 120can identify the location of the material 140 more precisely thanpossible with the lid camera 110.

Other locations for cameras can include, for example, on an opticalsystem guiding a laser for laser cutting, on the laser itself, inside ahousing surrounding the head 160, underneath or inside of the materialbed 150, in an air filter or associated ducting, etc. Cameras can alsobe mounted outside the CNC machine 100 to view users or view externalfeatures of the CNC machine 100.

Multiple cameras can also work in concert to provide a view of an objector material 140 from multiple locations, angles, resolutions, etc. Forexample, the lid camera 110 can identify the approximate location of afeature in the CNC machine 100. The CNC machine 100 can then instructthe head 160 to move to that location so that the head camera 120 canimage the feature in more detail.

While the examples herein are primarily drawn to a laser cutter, the useof the cameras for machine vision in this application is not limited toonly that specific type of CNC machine 100. For example, if the CNCmachine 100 were a lathe, the lid camera 110 can be mounted nearby toview the rotating material 140 and the head 160, and the head camera 120located near the cutting tool. Similarly, if the CNC machine 100 were a3D printer, the head camera 120 can be mounted on the head 160 thatdeposits material 140 for forming the desired piece.

An image recognition program can identify conditions in the interiorportion of the CNC machine 100 from the acquired image data. Theconditions that can be identified are described at length below, but caninclude positions and properties of the material 140, the positions ofcomponents of the CNC machine 100, errors in operation, etc. Based inpart on the acquired image data, instructions for the CNC machine 100can be created or updated. The instructions can, for example, act tocounteract or mitigate an undesirable condition identified from theimage data. The instructions can include changing the output of the head160. For example, for a CNC machine 100 that is a laser cutter, thelaser can be instructed to reduce or increase power or turn off. Also,the updated instructions can include different parameters for motionplan calculation, or making changes to an existing motion plan, whichcould change the motion of the head 160 or the gantry 210. For example,if the image indicates that a recent cut was offset from its desiredlocation by a certain amount, for example due to a part moving out ofalignment, the motion plan can be calculated with an equal and oppositeoffset to counteract the problem, for example for a second subsequentoperation or for all future operations. The CNC machine 100 can executethe instructions to create the motion plan or otherwise effect thechanges described above. In some implementations, the movable componentcan be the gantry 210, the head 160, or an identifiable mark on the head160. The movable component, for example the gantry 210, can have a fixedspatial relationship to the movable head. The image data can updatesoftware controlling operation of the CNC machine 100 with a position ofthe movable head and/or the movable component with their position and/orany higher order derivative thereof.

Because the type of image data required can vary, and/or because ofpossible limitations as to the field of view of any individual camera,multiple cameras can be placed throughout the CNC machine 100 to providethe needed image data. Camera choice and placement can be optimized formany use cases. Cameras closer to the material 140 can be used fordetail at the expense of a wide field of view. Multiple cameras may beplaced adjacently so that images produced by the multiple cameras can beanalyzed by the computer to achieve higher resolution or wider coveragejointly than was possible for any image individually. The manipulationand improvement of images can include, for example, stitching of imagesto create a larger image, adding images to increase brightness,differencing images to isolate changes (such as moving objects orchanging lighting), multiplying or dividing images, averaging images,rotating images, scaling images, sharpening images, and so on, in anycombination. Further, the system may record additional data to assist inthe manipulation and improvement of images, such as recordings fromambient light sensors and location of movable components. Specifically,stitching can include taking one or more sub-images from one or morecameras and combining them to form a larger image. Some portions of theimages can overlap as a result of the stitching process. Other imagesmay need to be rotated, trimmed, or otherwise manipulated to provide aconsistent and seamless larger image as a result of the stitching.Lighting artifacts such as glare, reflection, and the like, can bereduced or eliminated by any of the above methods. Also, the imageanalysis program can performing edge detection and noise reduction orelimination on the acquired images. Edge detection can includeperforming contrast comparisons of different parts of the image todetect edges and identify objects or features in the image. Noisereduction can involve averaging or smoothing of one or more images toreduce the contribution of periodic, random, or pseudo-random imagenoise, for example that due to CNC machine 100 operation such asvibrating fans, motors, etc.

FIG. 4A is a diagram illustrating the addition of images, consistentwith some implementations of the current subject matter. Images taken bythe cameras can be added, for example, to increase the brightness of animage. In the example of FIG. 4A, there is a first image 410, a secondimage 412, and a third image 414. First image 410 has horizontal bands(shown in white against a black background in the figure). Thehorizontal bands can conform to a more brightly lit object, though themain point is that there is a difference between the bands and thebackground. Second image 412 has similar horizontal bands, but offset inthe vertical direction relative to those in the first image 410. Whenthe first image 410 and second image 412 are added, their sum is shownin by the third image 414. Here, the two sets of bands interleave tofill in the bright square as shown. This technique can be applied to,for example, acquiring many image frames from the cameras, possibly inlow light conditions, and adding them together to form a brighter image.

FIG. 4B is a diagram illustrating the subtraction of images, consistentwith some implementations of the current subject matter. Imagesubtraction can be useful to, for example, isolate dim laser spot from acomparatively bright image. Here, a first image 420 shows two spots, onerepresentative of a laser spot and the other of an object. To isolatethe laser spot, a second image 422 can be taken with the laser off,leaving only the object. Then, the second image 422 can be subtractedfrom the first image 420 to arrive at the third image 424. The remainingspot in the third image 424 is the laser spot.

FIG. 4C is a diagram illustrating the differencing of images to isolatea simulated internal lighting effect, consistent with someimplementations of the current subject matter. There can be an object inthe CNC machine 100, represented as a circle in first image 430. Thiscould represent, for example an object on the material bed 150 of theCNC machine 100. If, for example, half of the material bed 150 of theCNC machine 100 was illumined by outside lighting, such as a sunbeam,the second image 420 might appear as shown, with the illuminated sidebrighter than the side without the illumination. It can sometimes beadvantageous to use internal lighting during operation, for example toilluminate a watermark, aid in image diagnostics, or simply to bettershow a user what is happening in the CNC machine. Even if none of thesereasons apply, however, internal lighting allows reduction orelimination of the external lighting (in this case the sunbeam) via thismethod. This internal lighting is represented in the third image 434 byadding a brightness layer to the entire second image 432. To isolate theeffect of the internal lighting, the second image 432 can be subtractedfrom 434 to result in fourth image 436. Here, fourth image 436 shows thearea, and the object, as it would appear under only internal lighting.This differencing can allow image analysis to be performed as if onlythe controlled internal lighting were present, even in the presence ofexternal lighting contaminants.

Machine vision processing of images can occur at, for example, the CNCmachine 100, on a locally connected computer, or on a remote serverconnected via the internet. In some implementations, image processingcapability can be performed by the CNC machine 100, but with limitedspeed. One example of this can be where the onboard processor is slowand can run only simple algorithms in real-time, but which can run morecomplex analysis given more time. In such a case, the CNC machine 100could pause for the analysis to be complete, or alternatively, executethe data on a faster connected computing system. A specific example canbe where sophisticated recognition is performed remotely, for example,by a server on the internet. In these cases, limited image processingcan be done locally, with more detailed image processing and analysisbeing done remotely. For example, the camera can use a simple algorithm,run on a processor in the CNC machine 100, to determine when the lid 130is closed. Once the CNC machine 100 detects that the lid 130 is closed,the processor on the CNC machine 100 can send images to a remote serverfor more detailed processing, for example, to identify the location ofthe material 140 that was inserted. The system can also devote dedicatedresources to analyzing the images locally, pause other actions, ordiverting computing resources away from other activities.

In another implementation, the head 160 can be tracked by onboard,real-time analysis. For example, tracking the position of the head 160,a task normally performed by optical encoders or other specializedhardware, can be done with high resolution, low resolution, or acombination of both high and low resolution images taken by the cameras.As high-resolution images are captured, they can be transformed intolower resolution images that are smaller in memory size by resizing orcropping. If the images include video or a sequence of still images,some may be eliminated or cropped. A data processor can analyze thesmaller images repeatedly, several times a second for example, to detectany gross misalignment. If a misalignment is detected, the dataprocessor can halt all operation of the CNC machine 100 while moredetailed processing more precisely locates exactly the head 160 usinghigher resolution images. Upon location of the head 160, the head 160can be adjusted to recover the correction location. Alternatively,images can be uploaded to a server where further processing can beperformed. The location can be determined by, for example, looking atthe head 160 with the lid camera, by looking at what the head camera 120is currently imaging, etc. For example, the head 160 could be instructedto move to a registration mark. Then the head camera 120 can then imagethe registration mark to detect any minute misalignment.

Basic Camera Functionality

The cameras can be, for example, a single wide-angle camera, multiplecameras, a moving camera where the images are digitally combined, etc.The cameras used to image a large region of the interior of the CNCmachine 100 can be distinct from other cameras that image a morelocalized area. The head camera 160 can be one example of a camera that,in some implementations, images a smaller area than the wide-anglecameras.

There are other camera configurations that can be used for differentpurposes. A camera (or cameras) with broad field of view can cover thewhole of the machine interior, or a predefined significant portionthereof. For example, the image data acquired from one or more of thecameras can include most (meaning over 50%) of the working area. Inother embodiments, at least 60%, 70%, 80%, 90%, or 100% of the workingarea can be included in the image data. The above amounts do not takeinto account obstruction by the material 140 or any other interveningobjects. For example, if a camera is capable of viewing 90% of theworking area without material 140, and a piece of material 140 is placedin the working area, partially obscuring it, the camera is stillconsidered to be providing image data that includes 90% of the workingarea. In some implementations, the image data can be acquired when theinterlock is not preventing the emission of electromagnetic energy.

In other implementations, a camera mounted outside the machine can seeusers and/or material 140 entering or exiting the CNC machine 100,record the use of the CNC machine 100 for sharing or analysis, or detectsafety problems such as an uncontrolled fire. Other cameras can providea more precise look with limited field of view. Optical sensors likethose used on optical mice can provide very low resolution and fewcolors, or greyscale, over a very small area with very high pixeldensity, then quickly process the information to detect material 140moving relative to the optical sensor. The lower resolution and colordepth, plus specialized computing power, allow very quick and preciseoperation. Conversely, if the head is static and the material is moved,for example if the user bumps it, this approach can see the movement ofthe material and characterize it very precisely so that additionaloperations on the material continue where the previous operations leftoff, for example resuming a cut that was interrupted before the materialwas moved.

Video cameras can detect changes over time, for example comparing framesto determine the rate at which the camera is moving. Still cameras canbe used to capture higher resolution images that can provide greaterdetail. Yet another type of optical scanning can be to implement alinear optical sensor, such as a flatbed scanner, on an existing rail,like the sliding gantry 210 in a laser system, and then scan it over thematerial 140, assembling an image as it scans.

To isolate the light from the laser, the laser may be turned off and onagain, and the difference between the two measurements indicates thelight scattered from the laser while removing the effect ofenvironmental light. The cameras can have fixed or adjustablesensitivity, allowing them to operate in dim or bright conditions. Therecan be any combination of cameras that are sensitive to differentwavelengths. Some cameras, for example, can be sensitive to wavelengthscorresponding to a cutting laser, a range-finding laser, a scanninglaser, etc. Other cameras can be sensitive to wavelengths thatspecifically fall outside the wavelength of one or more lasers used inthe CNC machine 100. The cameras can be sensitive to visible light only,or can have extended sensitivity into infrared or ultraviolet, forexample to view invisible barcodes marked on the surface, discriminatebetween otherwise identical materials based on IR reflectivity, or viewinvisible (e.g. infrared) laser beams directly. The cameras can even bea single photodiode that measures e.g. the flash of the laser strikingthe material 140, or which reacts to light emissions that appear tocorrelate with an uncontrolled fire. The cameras can be used to image,for example, a beam spot on a mirror, light escaping an intended beampath, etc. The cameras can also detect scattered light, for example if auser is attempting to cut a reflective material. Other types of camerascan be implemented, for example, instead of detecting light of the samewavelength of the laser, instead detecting a secondary effect, such asinfrared radiation (with a thermographic camera) or x-rays given off bycontact between the laser and another material.

The cameras may be coordinated with lighting sources in the CNC machine100. The lighting sources can be positioned anywhere in the CNC machine100, for example, on the interior surface of the lid 130, the walls, thefloor, the gantry 210, etc. One example of coordination between thelighting sources and the cameras can be to adjust internal LEDillumination while acquiring images of the interior portion with thecameras. For example, if the camera is only capable of capturing imagesin black and white, the internal LEDs can illuminate sequentially inred, green, and blue, capturing three separate images. The resultingimages can then be combined to create a full color RGB image. Ifexternal illumination is causing problems with shadows or externallighting effects, the internal lighting can be turned off while apicture is taken, then turned on while a second picture is taken. Bysubtracting the two on a pixel-by-pixel basis, ambient light can becancelled out so that it can be determined what the image looks likewhen illuminated only by internal lights. If lighting is movable, forexample on the translation arm of the CNC machine 100, it can be movedaround while multiple pictures are taken, then combined, to achieve animage with more even lighting. The brightness of the internal lights canalso be varied like the flash in a traditional camera to assist withillumination. The lighting can be moved to a location where it betterilluminates an area of interest, for example so it shines straight downa slot formed by a cut, so a camera can see the bottom of the cut. Ifthe internal lighting is interfering, it can be turned off while thecamera takes an image. Optionally, the lighting can be turned off forsuch a brief period that the viewer does not notice (e.g. for less thana second, less than 1/60^(th) of a second, or less than 1/120^(th) of asecond). Conversely, the internal lighting may be momentarily brightenedlike a camera flash to capture a picture. Specialized lights may be usedand/or engaged only when needed; for example, an invisible butUV-fluorescent ink might be present on the material. When scanning for abarcode, UV illumination might be briefly flashed while a picture iscaptured so that any ink present would be illuminated. The sametechnique of altering the lighting conditions can be performed bytoggling the range-finding and/or cutting lasers as well, to isolatetheir signature and/or effects when imaging. If the object (or camera)moves between acquisitions, then the images can be cropped, translated,expanded, rotated, and so on, to obtain images that share commonfeatures in order to allow subtraction. This differencing technique ispreferably done with automatic adjustments in the cameras are overriddenor disabled. For example, disabling autofocus, flashes, etc. Featuresthat can ideally be held constant between images can include, forexample, aperture, shutter speed, white balance, etc. In this way, thechanges in the two images are due only to differences from the lightingand not due to adjustment in the optical system.

Multiple cameras, or a single camera moved to different locations in theCNC machine 100, can provide images from different angles to generate 3Drepresentations of the surface of the material 140 or an object. The 3Drepresentations can be used for generating 3D models, for measuring thedepth that an engraving or laser operation produced, or providingfeedback to the CNC machine 100 or a user during the manufacturingprocess. It can also be used for scanning, to build a model of thematerial 140 for replication.

The camera can be used to record photos and video that the user can useto share their progress. Automatic “making of” sequences can be createdthat stitch together various still and video images along withadditional sound and imagery, for example the digital rendering of thesource file or the user's picture from a social network. Knowledge ofthe motion plan, or even the control of the cameras via the motion plandirectly, can enable a variety of optimizations. In one example, given amachine with two cameras, one of which is mounted in the head and one ofwhich is mounted in the lid, the final video can be created with footagefrom the head camera at any time that the gantry is directed to alocation that is known to obscure the lid camera. In another example,the cameras can be instructed to reduce their aperture size, reducingthe amount of light let in, when the machine's internal lights areactivated. In another example, if the machine is a laser cutter/engraverand activating the laser causes a camera located in the head to becomeoverloaded and useless, footage from that camera may be discarded whenit is unavailable. In another example, elements of the motion plan maybe coordinated with the camera recording for optimal visual or audioeffect, for example fading up the interior lights before the cut ordriving the motors in a coordinated fashion to sweep the head cameraacross the material for a final view of the work result. In anotherexample, sensor data collected by the system might be used to selectcamera images; for example, a still photo of the user might be capturedfrom a camera mounted in the lid when an accelerometer, gyroscope, orother sensor in the lid detects that the lid has been opened and it hasreached the optimal angle. In another example, recording of video mightcease if an error condition is detected, such as the lid being openedunexpectedly during a machining operation. The video can beautomatically edited using information like the total duration of thecut file to eliminate or speed up monotonous events; for example, if thelaser must make 400 holes, then that section of the cut plan could beshown at high speed. Traditionally, these decisions must all be made byreviewing the final footage, with little or no a priori knowledge ofwhat they contain. Pre-selecting the footage (and even coordinating itscapture) can allow higher quality video and much less time spent editingit. Video and images from the production process can be automaticallystitched together in a variety of fashions, including stop motion withimages, interleaving video with stills, and combining video andphotography with computer-generated imagery, e.g. a 3D or 2D model ofthe item being rendered. Video can also be enhanced with media fromother sources, such as pictures taken with the user's camera of thefinal product.

Additional features that can be included individually, or in anycombination, are described in the sections below.

Laser Head

FIG. 5 is a diagram illustrating a camera providing high-resolutionimages of the material 140 in a CNC machine 100, consistent with someimplementations of the current subject matter. Cameras on or near thehead 160, or cameras mounted anywhere in the CNC machine 100 and focusedto image a narrow field of view around a cut location, can providehigh-resolution images. The example shown in FIG. 5 corresponds to ahead 160 in an implementation where the CNC machine 100 is a lasercutter. Here, the head 160 can include several optical components,including one or more windows 550, 580 to allow entrance or exit of alaser beam 510, one or more mirrors 560 for directing the laser beam510, one or more lenses 570 for focusing the laser beam 510, etc.

The head camera 120, here shown mounted to the head 160, can have anoverall field of view 122. The overall field of view 122, as illustratedin FIG. 5, can include one or more cuts. The volume of the cut is hereinreferred to here as an output volume 530. Similarly, there can be aperipheral volume 540 proximate to the cut, and a portion of thematerial 140. The overall field of view 122 thus can include twoadditional fields of view that correspond to the above features. Theoverall field of view 122 can include an output field of view 326viewing the output volume 530 and a peripheral field of view 524 viewingthe peripheral volume 540.

The output volume 530 can correspond to the output of the CNC machine100. The output volume 530, in the example of a laser cutter, can be thevolume (or portion thereof) of a cut made by the CNC machine 100. In theexample of a 3-D printer, the output volume 530 can correspond to the“tube” (or portion thereof) of material 140 that the CNC machine 100deposits. In yet another example, if the CNC machine 100 is an inkjetprinter, the output volume 330 can correspond to a portion of the inkthat is deposited on the surface of the material 140.

Similarly, the peripheral volume 540 can include a region proximate tothe output volume 540 where additional effects from operation of the CNCmachine 100 can occur. In the example of a laser cutter, the peripheralvolume 540 can include a debris field, the extent of burning ordiscoloration of the material 140 that results from the cutting, etc.

By analyzing, with an image analysis program, image data acquired by thehead camera 120, conditions can be identified that correspond to theoutput volume 530 or the peripheral volume 540. Many examples of suchconditions are described in further detail herein, however one examplecan be determining the present cut depth and adjusting the laser tochange or correct the cut depth. In this way, instructions can begenerated for the CNC machine 100 to provide a second, possiblydifferent, output in response to the identified condition. The CNCmachine 100 can then execute the instructions.

Conditions (or features) can also be identified from images within thefields of view of the head camera 120. These conditions or features caninclude, for example, inadequate lighting, shadows, reflections,obstructions, smoke, other previous cuts, registration marks, markingsfor tracing, etc. Many of these features, and their relationship tocapabilities of the CNC machine 100, are described in greater detailthroughout this application.

Interchangeable Heads

The head 160 can be detachable from the gantry 210 to allow theplacement of other heads or attachments to be connected. Alternativeheads can include, for example, a printer head such as an inkjet printerhead, a drag knife head, a 3-D printer head, diode laser, plasmacutters, spindle, waterjet etc. The CNC machine 100 can also haveappropriate connector ports as needed for operation of the alternativeheads, for example, power, air, data, water, etc. The active portion ofthe alternative head (nozzle, cutting point) can be positioned at thesame X-Y location on the head 160 as the active portion of the head 160prior to changing (for example in a laser cutter, the location where thebeam is directed to the material 140). The new head 160 can also belocated at a different position relative to the old head 160, andmachine vision alignment can be used to ensure that the gantry 210 andhead 160 move to compensate and maintain alignment when using the newhead 160. Once the alternative head is in place, the motion plan and/oracquired images can then be used to guide operations with thealternative head. The gantry 210 and/or heads 160 can also includeposition retaining fasteners to maintain the positioning of the heads160 across interchanges. The position retaining fasteners can include,for example, magnets, slots, locks, screws, etc.

In the example of a laser cutter, the laser operation can configured toonly work upon the detection of a specific type of head (for example ahead configured to receive a laser beam). The laser can also beconfigured not to function when no head 160 is detected, or if the head160 detected is not designed to work with the laser, for example if thehead 160 is a different model, different type of head (inkjet, cuttingknife), etc. Upon detection of a laser-incompatible head, for example ahead designed to cut material by means of a razor blade, several actionsmust take place. First, and most importantly, the laser must beinstructed not to fire. This may occur via one or multiple methods forredundancy, including but not limited to: absence of the head directlyprevents the laser from firing, for example by removing an electricalsignal that enabled the laser; absence of the head may be detected bythe computing resources on the device (the firmware) which in turn doesnot order the laser to fire; or, in the circumstance most likely tooccur, the absence of a laser-compatible head causes a signal to be sentto the software generating the machine file, and a different machinefile is generated that replaces the laser on/off instructions with knifeup/down instructions, modifies the machine plan to take the new cuttingtool into account, and makes other allowances for the different head andcutting tool.

In one implementation, there can be an ink, toner, plotter pen, or otherprinter head attached in place of the head 160. A print pattern can thenbe printed onto the material 140. The head 160 can then be re-attachedand perform a cut that is aligned with the colors printed on thematerial 140. Such alignment can be achieved in several ways. First,optical alignment using the cameras can detect the features that havebeen printed by a motion plan. The motion plan can be created by asystem with knowledge of the printed image that instructs the laser headto cut in a pattern that corresponds with the image. Second, acombination of an imaging system to align the pattern and then relyingon a digitally stored version of the pattern to generate the cut path.In another implementation, the process can be reversed. First, a cut orengraving can be made by the head 160 on the material 140. Afterreplacing the head 160 with a printing head, the cut or engravedmaterial 140 can be printed upon, using the aforementioned alignmenttechniques. The optical systems described herein can maintain alignmentof the ink source with a cut and ensure the proper distance between thecut and the ink source in the head 160. In one example, the head canhave equipment enabling it to function as an inkjet printer. Then, forexample, when the head is installed, the laser no longer activates. Themotion plan can be replaced by software similar to that used fortraditional inkjet printers, and the head can be instructed to move backand forth, advancing a small amount with each pass, depositing ink as itmoves. The result is that the device can function as an inkjet printer,although a traditional inkjet printer moves the material as the headgoes back and forth. However, unlike a traditional inkjet printer, thiscan accommodate material that is thicker and even of variable thickness,and when the ink is applied, further machining operations can beperformed, for example with the laser.

In such an example, the software can confirm the precise location of thematerial and the head after the head had been switched. This could beaccomplished through the mechanisms explained elsewhere in thisdocument, for example by looking for one or more marks made by the printhead that are distinctive, or by looking for the corners of the material140.

The techniques described herein used for automatic head adjustment anddepth measurement may be used with alternate heads. For example, thedistance to the surface of the material 140 can be incorporated, by themotion plan, to move an inkjet head up and down to maintain optimaldistance from the surface being printed. Also, the depth measurementtechniques described herein can be used with a 3D printing head todetermine if the print is progressing properly.

Fans in the CNC Machine

FIG. 6 is a diagram illustrating fans integrated into the head 160,consistent with some implementations of the current subject matter. Thehead 160 can incorporate any number of fans to assist in removing orpreventing undesired particulates from accumulating in the head 160. Fanoperation can be coordinated with camera or sensor data, in either anopen-loop or closed-loop manner to respond to observed conditions.

In the implementation where the CNC machine 100 is a laser cutter, therecan be an air-assist fan 610 that directs a stream of air or other gasto the cut location or a location proximate to the cut. The air-assistfan 610 can direct air to the cut as shown by the vertical arrows. Theair-assist fan 610 can be mounted to any component in the CNC machine100, for example, to the head 160, an arm extending into the interior ofthe CNC machine, etc. The air-assist fan 610 can also include a filterto remove particulates. The air assist fan can also be located remotely,for example at a fresh air intake on the side of the machine, with theair routed to the head by means of a hose or other routing mechanism.

In another implementation, there can be a purge fan 420 installed in thehead 160. Referring back to FIG. 5, the head 160 can house, for example,turning mirrors, lenses, windows, etc. There can also be one or morepurge fans that create an area of positive pressure. As shown in FIG. 6,the purge fan 620 takes air from outside the head 160 and injects itinto the volume on the side of an optical element, for example the lens,to create the area of positive pressure on the side closest to thematerial 140. This region of positive pressure reduces contaminated airor debris from entering the head 160 from below, or through otheropenings in the head 160. The purge fan 620 can also include a filter toremove particulates from the fan intake. The purge fan can also belocated remotely, for example at a fresh air intake on the side of themachine, with the air routed to the head by means of a hose or otherrouting mechanism. Even if fresh air is not routed directly, fresh aircan be directed by fans at the intake for the purge or air assist fans.Air routed in this manner can have a higher component of fresh air thanfrom the interior of the unit. Air intended for purge can also be usedfor air assist, or vice versa.

In some implementations, there can be (though not shown in FIG. 1)exhaust fans, ventilation fans, cooling fans, etc. These fans can belarger and more powerful than the air-assist fan 610 and the purge fan620. Operation of any of the fans, for example the larger fans describedabove, can be interfaced with the motion plan to, for example, operateat designated speeds at different parts of the motion plan. Here, dataabout expected debris and/or smoke can be accessed from a computermemory ahead of time to coordinate fan operation with the motion planbased on the expected amounts of smoke and/or debris. This data can becross-referenced with, for example, a particular cut, material, CNCmachine operating parameters, etc.

These fans can be controlled or coordinated with other sensor data thatis received during operation of the CNC machine 100 (for example fromsmoke detectors or cameras that image smoke or particulates). Thereal-time sensor data can provide basis for updates to the motion planbased on the fan settings, limits of the fans, or noise/vibration limitsset by a user or preset in the system. Thus, in some implementations,the fan speed can be varied continuously based on the observed smokelevel, particle counts, chemicals detected, or other parameters observedby sensors in the CNC machine 100. Conversely, the motion plan canremain unchanged and the fan speed adjusted to compensate for changingconditions in the CNC machine 100. There can also be feedback mechanismswhere fan operation is tied to a priority of operations. For example,there can be instructions for keeping the fan noise (possibly measuredby onboard microphones) or RPMs below a certain value. However, if smokeor debris is detected that exceeds a predefined limit, then the fanspeeds can be increased if keeping smoke levels low is higher prioritythan reducing noise.

In another implementation, the user can be instructed not to open thelid of the CNC machine 100 until internal smoke levels have reachedacceptably low levels. The instruction can be, for example, an audio orvisual alarm, a status indicator on the CNC machine 100. The CNC machine100 can also incorporate automatic locking of the lid until theconditions for allowing opening are satisfied.

Again, any of the fan operations described herein apply equally toimplementations where the CNC machine 100 is a 3-D printer, inkjetprinter, lathe, etc.

Gantry-Mounted Laser

FIG. 7 is a diagram illustrating a top view of the CNC machine 100having a laser and the head 160 both mounted on a gantry 210, consistentwith some implementations of the current subject matter. The gantry 210can be, for example, positioned over the material bed 150. The laser 710can translate, for example, only in the Y direction on a track 220connected to the gantry 210. The gantry 210 can also hold the head 160,which translates only in the X direction on the track 220. The head 160and the laser 710, both mounted on the same gantry 210, can maintain afixed Y separation.

This configuration has several advantages. First, the overall beam pathcan be shorter than it would be if, for example, the laser 710 wasoutside the CNC machine 100 or even at a fixed location within the CNCmachine 100. Furthermore, alignment of the laser 710 with the head 160is simplified by having them both referenced to the gantry 210.

The gantry 210 can interface with independent gantry actuators (one ormore on each track 220) that are responsible for moving each end of thegantry 210 in order to maintain or restore alignment of the gantry 210.The motion plan can control the gantry 210 actuators to operateindependently, together, or in any manner consistent with the executionof the motion plan. Alternate implementations can have one actuator orany number of additional actuators. In the case of two or moreactuators, they can be driven separately to adjust the angle of thegantry 210, for example making it parallel to the material bed 150.

In one implementation, the laser 710 can be oriented in the X direction,and a turning system 720 can be mounted on the gantry 210 to direct thebeam 510 from the laser 710 to the head 160, for example with a pair ofmirrors. The laser beam from the laser 710 can be turned by a knownamount, for example 180°, to enter the head 160 parallel to beamdirection from the laser 710. Since the head 160, the turning system720, and the laser 710 are all mounted on the gantry 210, theiralignment relative to each other can be guaranteed if the gantry 210 iskept from disturbance, even if the remainder of the CNC machine 100 isdisturbed.

Sealed Optical System

FIG. 8 is a diagram illustrating a sealed optical system 810, consistentwith some implementations of the current subject matter. In oneimplementation, for example where the CNC machine 100 acts as a lasercutter, there can be a sealed optical system 810, similar to the turningsystem 520, to guide the laser beam 310 from the laser 310 to the head160. As described below, the sealed optical system 810 can be combinedwith the laser 310 to result in a closed system where none of theturning mirrors or laser optics are exposed to outside (or otherwisecontaminated) air, with the possible exception of an aperture with awindow that can be easily accessed and cleaned.

In one implementation, the sealed optical system 810 can include anentry aperture 840, a housing, two turning mirrors 830 oriented at afixed angle to each other which in one implementation is 90°, and awindow attached to an exit aperture 680. The sealed optical system 810can also include one or more pivots, possibly on different axes, toallow the sealed optical system 810 to rotate, thus changing the angleof the turning mirrors 830 relative to the incoming laser beam 812. Themirrors can also be mounted so that they are independently adjustablewithin the system 810. In the example shown where the axis of the pivotis perpendicular to the diagram and the angle of the mirrors is 90°, byadjusting the angle of the sealed optical system 810, the separation ofthe incoming laser beam 812 and the outgoing laser beam 816 can beadjusted without affecting the angle of the final beam 816, as wouldoccur if a single mirror 830 was adjusted independently. Because in thisexample the turning mirrors 830 are oriented to always result in a 180degree turn regardless of the angle of the sealed optical system 810,rotating the sealed optical system 810 only translates the outgoinglaser beam 816 while retaining parallelism between the incoming laserbeam 812 and the outgoing laser beam 816. Such a translation can beadjusted to align the laser beam 350 to optical elements in the head160.

The windows can be any sort of removable optical window suitable for thetransmission of laser light from the sealed optical system 810 to thehead 160. In one example, the laser light wavelength can be 10.6 micronsemitted from a carbon dioxide laser, and the window can be Zinc Selenide(ZnSe). The windows can act to substantially seal the sealed opticalsystem 810 against air which can contain dust, smoke, or othercontaminants that can coat any of the other optical elements in thesealed optical system 810 or in the laser 710. In place of a window, inthe laser 710 or head 160, pressurized air can be introduced by means ofa fan or a compressed air line, preventing contaminants from entering bymaintaining positive pressure in the enclosure. Alternatively, the exitaperture 850 can simply be extended, optionally with baffles, to preventcontaminants from migrating into the sealed optical system 810. Othertechniques can be used to reduce or eliminate contamination of theoutput window including, the direction of clean air at the window, thedesign of airflow in the system so that dirty air is not directly routedat the window, and other measures.

In addition, there can be a sleeve 870 that can be used to couple thelaser 710 and/or the head 160 to the sealed optical system 810 in such away to prevent contaminated air from affecting the laser 310 or a windowon the head 160 that is inside the sleeve 870. The sleeve 870 can berigid, or flexible to allow for pivoting motion of the sealed opticalsystem 810. The sleeve 870 can be, for example, a flexible orcollapsible sleeve, a rigid telescoping tube with grease or otherlubricant acting as a sealing fluid, etc. A combination of thesetechniques, such as an extended exit aperture with pressurized air, canalso be used.

Laser Alignment System

FIG. 9 is an end sectional view 500 illustrating bumpers 920 aligningthe laser 710 with a housing 910, consistent with some implementationsof the current subject matter. In one implementation, the laser 710 canbe secured inside the housing 910 with the laser beam exiting through anexit aperture (not shown) on the housing 910. When either the laser 710changes, for example, when being installed, replaced with a new model orotherwise having a different physical size, or when the housing 910changes, the laser 710 may no longer be centered with the exit aperture.To have the laser 710 aligned with the laser aperture; there can be anumber of bumpers that abut the laser 710 to position the laser 710 inthe proper location. In one implementation, there can be two pairs ofbumpers 920, one pair that run vertically on either side of the laser,and another pair that run horizontally on the top and bottom of thelaser 710. With a known laser size, and known dimensions of the laserhousing, the thicknesses of the bumpers 920 can be selected to align thelaser 710 with the exit aperture.

The beam path can be determined, for example, before or after the laseris installed. Bumpers 920 can then be selected based on the determineangle and offset of the beam relative to the housing or the exitaperture. The bumpers 920 can be manufactured beforehand to be a knownsize and then the bumpers 920 that are best able to correct for theangle and offset can be selected. Alternatively, the bumpers 920 can becustom-made to provide the required correction, or bumpers can bestacked, or bumpers can be fabricated via a method such as machining or3D printing. Information about any expected or measured misalignmentscan be provided to a user and appropriate bumpers 920 can bepre-selected to correct for the misalignment upon installation.

FIG. 10 is a top sectional view of the laser 710 offset by the bumpers1020, 1030 from the center of the housing 910, consistent with someimplementations of the current subject matter. FIG. 11 is a topsectional view of the bumpers 1120, 1130 aligning the laser with anaperture 1010 in a misaligned housing, consistent with someimplementations of the current subject matter. There can be multiplesets of bumpers, each set providing a center location for the laser 710inside the housing. As described above, the laser 710 can be centered onthe exit aperture 1010, however the laser 710 can also be offset, orangled, by using bumpers of predetermined thickness. For example, asshown in FIG. 10, the right vertical bumpers 820 are thicker than theleft vertical bumpers 830, resulting in a translation of the laser fromthe center of the housing. Similarly, as shown in FIG. 11, twodifferently sized sets of bumpers 1120, 1130 are used to have differentcenter points relative to the housing 910. When the laser is positionedwith the bumpers 910, the laser 710 is angled relative to the housing910.

Laser Vertical Alignment System

FIG. 10 is a front sectional view of an angularly adjustable turningsystem, consistent with some implementations of the current subjectmatter. While the features described above relate to alignment in the Xand Y directions, the features described below address methods ofaligning the vertical angle of the laser beam (or in the Z direction). Afurther method of aligning the output of the laser with the laser head160 is to adjust the vertical angle A of the turning system 720. In oneimplementation, the turning system 720 can be mounted to, or rest upon,a rotatable mount 1210. The rotatable mount 1210 can, in someimplementations be connected to the CNC machine 100 with a pivot orhinge. In other implementations, there can be a stationary point ofconnection, for example with a weld, fastener, or with a contiguouspart. There can also be an actuator 1220 which can act to move one partof the turning system 720 in such a manner as to effect a rotation ofthe turning optics 530 in the turning system 720. In the example of FIG.10, this is shown by the actuator 1220 being a screw which, when turned,causes the angle of the rotatable mount to change. In another example,the actuator can be powered or computer controlled. As shown, this is arigid rotation of the rotatable mount 1210. However, for a rotatablemount 1210 fixed at one location, the actuator 1220 can result in amechanical deformation of part of the rotatable mount 1210, resulting insubstantially the same rotation effect. In some implementations, theneutral, or rest angle, can be an angle such that the emerging laserbeam is not parallel to the entering laser beam. In this implementation,the actuator 1220 can be adjusted until the desired alignment isachieved. Initially, the angle A can be, for example, approximately 5,4, 3, 2, 1, 0, −1, −2, −3, −4, or −5 degrees. In some cases, an angle of0 may not be optimal. For example, if an entrance window to the laserhead 160 is higher than the laser output from the beam, then the angle Acan be adjusted to a value greater than 0 to allow the laser beam to gothrough the center of the entrance window.

FIG. 13 is a front sectional view of a cantilevered angularly adjustableturning system, consistent with some implementations of the currentsubject matter. Similar to the implementation of FIG. 11, above, thecantilever can include an angle bracket 1310 upon which the turningsystem 720 rests or is mounted to. The screw 1320, shown extendingbetween the horizontal arm and the vertical arm of the cantilever, canbe turned to cause a deflection of the horizontal arm. The deflectioncauses the angle of the beam 710 to move in the vertical direction,allowing vertical alignment of the laser beam with the head 160. Alsosimilar to the above, the interior angle of the angle bracket 1310 canbe 90 degrees, or can have an offset that is correctable with the screw1320. In some implementations, the offset can be approximately, 5, 4, 3,2, 1, 0, −1, −2, −3, −4, or −5 degrees. In other implementations, otherthe interior angle can be 60 degrees, 45 degrees, 30 degrees, etc. Inany implementation, the screw can act to correct the initial smalladjustment required by the angle of the bracket 1310.

FIG. 14 is a perspective view of a second cantilevered angularlyadjustable turning system, consistent with some implementations of thecurrent subject matter. Multiple screws 1420 can be used so that thebracket is deflected equally at all points along the Y axis.Alternately, the corner of the bracket can be selectively weakened orstrengthened along the Y axis (shown by the corner area 1410) so thatforce applied at a single point by the screw 1420 can result in equalvertical deflection across the bracket.

Head Location Detection

Traditionally, a variety of systems are used to detect machine position.There can be encoders on the motor, on the shaft, and/or mechanicalswitches that detect when the machine is in extreme positions or to“reset” the software's internal estimation of the head's position to acorrect, known state.

These approaches can be replaced by camera systems in someimplementations of the current subject matter. An overhead camera, forexample the lid camera 110, can visually locate the head 160 or otherparts of the system. A camera 120 mounted on the head 160 can detectwhen the head 160 has been moved to a specific location, for exampleover a target printed on a home location, with extreme accuracy.

Head Motion Detection

Cameras with a wide angle view can determine position, velocity,acceleration, and other motion parameters for the head 160. A camera 120mounted on the head 160 can do this by observing the apparent motion ofthe material 140 in the images it acquires. Special purpose cameras canbe optimized for this, for example the image sensor on an optical mousemay be repurposed for the head 160 providing dedicated hardware that isoptimized to calculate displacements. A camera 110 mounted on the lid130 or elsewhere, with a view of the head 160, can monitor the head 160directly.

Calibration Cuts to Characterize Material

When a material 140 is introduced into a CNC machine, it may haveunknown physical properties. As a result, it may not be known whatsettings are optimal for machining. These settings can include, forexample, rotary speed for a CNC mill or lathe, water power for awaterjet, or laser power and speed for a laser cutter.

With a camera, calibration passes can be made over the material 140 todetermine appropriate settings for the desired task. In oneimplementation, to determine a minimum power to make a cut with a lasercutter, cuts of increasing power can be made until the material 140 ispenetrated. Cuts of lower power can be measured for cases in which theuser wishes to mark but not penetrate the surface. The camera can alsocapture how cuts at different power levels, speeds, and so on, will looklike. For example, light-color plywood may get slightly darker when thelaser is activated at 20% power at maximum speed. Increasing to 30%power may darken it slightly more. But at 40% power, the top veneerlayer of the plywood may be pierced, revealing the layer below, whichmay be a completely different color—lighter or darker. With a camera,the resulting visual appearance of the material 140 can be determined.The determined response of the material 140 from a given processing stepcan be incorporated, either automatically or by a user, into the motionplan.

Material Thickness Determination—General

A variety of methods can be used to determine the thickness of thematerial 140 to be cut or engraved. One method can be to determine theheight of a top surface of the material 140 and compare this height to aknown position of a bottom surface of the material 140. Typically,though not necessarily, the bottom surface of the material 140 coincideswith the top surface of the material bed 150, which can be of a knownheight. The difference between the height of the top surface of thematerial 140 and the height of the bottom surface of the material 140can then be determined to be the thickness of the material 140. Inanother implementation, the process used to determine the thickness ofthe material 140 can be calibrated by measuring a material 140 with aknown thickness. For example, an object with a 1 cm thickness can beplaced on the material bed 150. Data can be acquired by the cameras andthe data can be associated with the known thickness of the object. Inanother implementation, the cameras can determine the height of thesurface the material 140 is resting on. For example, if there are otherpieces of material 140 between the topmost material 140 and the materialbed 150, the cameras can measure the height of the topmost surfacebefore material 140 is inserted or measure the height of the topmostsurface in a location not obscured by the material 140.

In one implementation, the height at different points can be measured,for example in a grid pattern, on the surface of the material 140 inorder to characterize the curvature of the material 140. Once the heightat many points on the material 140 is known (and consequently thesurface curvature), instructions can be generated so that one or moreactuators can follow the curve of the material 140. For example, acutting laser can be kept in focus, a camera can be kept in focus, a 3Dprinter head can maintain a constant separation from the material base,or a CNC milling bit can be kept a constant distance from the material140.

Once the distance between the surface and a lens (or any other referencepoint in the CNC machine 100) is known, this can be incorporated toprecisely control the height of the head 160 (and optics internal to thehead 160) when machining.

Contrast detection, phase detection, or any other distance findingtechniques described herein can also be implemented on other machines,for example, a CNC mill where the distance determines where the head 160is to position a bit. In this way, the motion plan can incorporate, forexample, contrast detection, autofocus, etc. to perform real-timeanalysis of the position of the material 140 and/or the position of thehead 160 relative to the material 140.

Material Holding

While knowing the position of surface of the material 140 is important,and the surface position (or height) can be easiest to measure, thethickness of the material 140 is also important. If the material 140 canbe pressed flat, for example against the material bed 150, then theheight of the top of the material 140 minus the height of the materialbed 150 equals the thickness. For that reason, methods for holding thematerial 140 firmly to the support can be combined with any method formeasuring the thickness of the material 140. This can be helpful insituations where the material 140 may have a natural tendency to flex orbow, or where the material 140 may be lightweight and have air pocketsunderneath.

In one implementation, there can be at least one plunger that can holdthe material 140 firmly against the support. The plunger can beproximate to the point of cutting, or can be at another location orlocations on the material 140. Also, the position of the plunger itselfcan provide a cross check to any optical determination of material 140thickness, if for example, the height of the surface of the plunger isknown relative to the surface of the material bed 150.

In another implementation, the material bed 150 can be a vacuum tablewith a number of apertures extending through the surface to a vacuumsystem. The vacuum system can create a negative pressure through theapertures and underneath the material 140, which is then held downagainst the vacuum table by the pressure difference on either side ofthe material 140.

There can be situations where the material 140 is unable to be pressedagainst the material bed 150, for example, curved metal pieces, stone,etc. If the material 140 is known to be of a constant thickness, thenthe thickness can determined from a measurement at any location on thematerial 140. If the material 140 contacts the reference surface at ormore points, then a determination of the lowest point on the surface ofthe material 140 can be interpreted by the CNC machine 100 and comparedto the height of the material bed 150 in order to determine thethickness of the material 140. In the case where the material 140thickness is measured in multiple locations, but not at the locationwhere the surface is lowest, a map can be created from the pointsmeasured. The slope calculated from existing points may be used toidentify a likely area for a local minimum, which can in turn be sampledfor more accurate measurements.

Material Thickness Determination by Stereoscopy

One method for determining the height or position of surface features ofthe material 140 can be to perform stereoscopic observations of thematerial 140 in order to determine a depth profile of the material 140,using either multiple cameras or multiple images from the same camera(moving between each exposure) to determine distance. In oneimplementation, the stereoscopic measurements can be performed by one ormore lid cameras and/or head cameras. There can also be additionalcameras dedicated for this purpose positioned within the CNC machine100. Here, the multiple images required for producing a stereoscopicimage can be interpreted by an image analysis program in order todetermine, based on the differences between the images taken atdifferent angles, the depth of the features imaged on the material 140.To determine the height of the surface of the material, images arecaptured from two separate cameras, and one or more features on thesurface of the material are isolated and considered. The amount by whichthe observed feature moves between the two camera images indicates itsdistance and thus the height of the material, in the same manner thathuman binocular vision uses to determine distance.

In some implementations, a motion plan can be created that includespositioning the head 160 such that a distinctive feature to be measuredis within the view of a camera located on the head 160. Then, the cameracan acquire an image of the feature. A second motion plan can be created(or a second step in a single motion plan) to move the head 160 by afixed amount. After the head 160 moves, the feature should be withinview of the camera. A second image, containing the feature, can then becaptured by the camera. In each of the images, the feature isidentified. An image analysis program can then measure how much thefeature has moved in each image, relative to the amount of cameramovement. Based on the relative apparent movement, the height of thefeature can be determined. In general, the closer the feature is to thecamera (i.e. height of the feature) the more it will appear to havemoved.

Material Thickness Determination by Interferometry

Another method of acquiring the distance to the surface of the material140 can be to include an imaging laser and an imaging detector toperform interferometry on the surface of the material 140. Here, lightfrom the imaging laser can be used to reflect off the surface of thematerial 140 and then be directed to a detector. Light from the imaginglaser can also be directed to a reference mirror and then also to thedetector. The changing number of interference fringes at the detectorcan be detected and counted in order to determine the distance to thesurface of the material 140. In one implementation, a laser output fromthe head 160, for example that used for cutting, can also be used as theimaging laser. Alternatively, the imaging laser does not have to be alaser, it can be any light source of known wavelength, for example, anatomic lamp, a band-pass filtered light source, etc.

Material Thickness Determination by Contrast Detection

In another implementation, an algorithm that takes multiple images witha camera having a known focal plane when each image is taken can use avariation in focal plane to determine the distance to the surface of thematerial 140 by determining the image with the maximum contrast. In thisimplementation, images of the material 140 can be taken by the headcamera 120, the lid camera 110, or any other camera in the system thathas the ability to adjust its focus, either by changing its position orthe position of a lens. The analysis can involve varying the position ofthe one or more lenses until the image of the material 140 taken by thehead camera 120 has a maximum contrast. When this condition is detected,the focal plane of the camera is the same as the distance from the lensto the surface of the material 140, so the height of the surface of thematerial 140 is known.

In some implementations, the lens can be moved to a first location, forexample the top of its range in the camera or in the head 160. An imagecan then be acquired at that first location. The contrast can bequantified, for example, by taking a Fourier transform of the image andmeasuring the amplitude of the high-frequency components characteristicof a rapid change in the image. Then, the lens can be moved to a secondlocation, for example lower in the cameras range. The contrast can bequantified after each movement, while moving the lens in the directionthat results in an increase in the determined contrast. The lens is infocus when at a location where the contrast is a maximum.

Material Thickness Determination by Phase Detection

In one implementation, phase detection can be used in order to determinedistance from a lens to the material 140. In this implementation, imagestaken of a material 140 are divided into at least two portionscorresponding to light passing through at least two different parts ofthe lens symmetrically arranged to be imaging the same location when thelens is at its focal length from the material 140. The intensity orother image features of each portion can then be compared. The positionof the lens can be adjusted until the portions imaged through each ofthe parts of the lens are substantially identical. When that iscomplete, the focal length of the lens is the distance of the materialfrom the lens.

Material Thickness Determination by Time of Flight

In one implementation, time-of-flight techniques can be used todetermine distance from a source to an object in the CNC machine 100.For example, there can be a light source that emits pulses or otherknown waveforms of light. A detector can detect the light reflected offa surface. By measuring the time between emission and detection andknowing the path between the source and the detector, the distancebetween the source (or detector) and the object can be determined. Asimilar procedure can be performed with a sound source. Thetime-of-flight can be measured by the detector based on rising orfalling edges of a signal, interference patterns, signal ring-down, etc.

Material Thickness Determination by Imaging a Spot Location/Shape

FIG. 15 is a diagram illustrating the determination of material 140thickness by the lid camera 110 imaging a spot on the material 140produced by a distance-finding light source 1510, consistent with someimplementations of the current subject matter. In one implementation, awell-collimated light beam from the distance-finding light source 910,for example from a laser diode or LED with a tight beam, can be pointedat the material 140 at an angle. As shown in the left pane of FIG. 15, athicker material 140 (of thickness T1) will intercept the beam sooner,at a distance D1 from the distance-finding light source 1510, causingthe intersection spot to be visible to the lid camera 110 closer to thedistance-finding light source 610. As shown in the right pane of FIG.15, thinner material 140 (of thickness T2) will allow the beam to travelfarther, so the beam will appear to intersect the material 140 farther(at distance D2) from the distance-finding light source 1510. Thelocation of the bright spot on the material 140 can thus be directlyproportional to the thickness of the material 140. In otherimplementations, the distance-finding light source 1510 can be camerasother than the lid camera 110, or any combination of cameras in the CNCmachine 100.

In another implementation, the distance-finding light source 1510 canhave a measureable divergence. If the material 140 is thick, then thespot on the surface of the material 140 will appear to be small. If thematerial 140 is thin, then the spot will be larger, as the light willhave diverged more before it intersects the material. The thickness ofthe material 140 can be determined using a trigonometric calculationbased on the known divergence angle and the measured size of the spot onthe surface.

In a related implementation, the focal length of the distance-findingcamera can be made to be as small as possible. If the beam spot is nearto the camera it will be in focus and therefore appear smaller; if it isfar away, it will be blurry and thus larger and dimmer. This techniquemay be combined with the divergence technique to make the increase inspot size even more easily detected.

Material Thickness Determination by Imaging Laser Spot Size

FIG. 16 is a diagram illustrating determination material thickness byimaging a laser spot size, consistent with some implementations of thecurrent subject matter. To provide precise cuts, the laser should befocused at the surface of the material 140. If the laser is out offocus, the cut can be larger than expected and the cut may have adifferent depth than desired. In one implementation, if a lens 570 inthe head 160 specifies a particular focal point for the laser, then aminimum spot size 1610 can be measured by a camera viewing the laserspot on the surface. Conversely, if the material 140 is not at adistance equal to the focal length of the lens 570, then the spot size1620 will be larger. By measuring the spot size, the lens 570 in thehead 160 can be adjusted until the laser spot size is either at aminimum, or other known size, which corresponds to the surface of thematerial 140 being at the focal length of the lens 570. In someimplementations this adjustment can be done automatically and/orcontinuously in order to provide a constant power density at the surfaceof the material 140. As a result, a consistent cut can be provided evenif the thickness of the material 140 changes. Also, if there is adiscrepancy between the observed spot size and the expected spot size,then either the “known” focal length of the lens 570 is inaccurate orthe determination of the surface height is inaccurate. Indications ofthese inconsistencies can be provided to the user or otherwise logged bythe CNC machine 100. The laser used for this may be the primary cuttinglaser, or a secondary laser (typically lower-power laser at a frequencythat is viewable more readily with a camera, such as a helium-neonlaser). The spot size may be observed directly if the secondary laser isat a frequency that the camera can register, or indirectly by looking atthe size of the discoloration, engraving, or cut produced by thesecondary laser.

In one implementation, the cutting laser can be used to draw a line(shown by the solid horizontal shape in FIG. 16) by moving the head 160across the material 140 while the laser is operating. While the laser ismoving, the focusing lens 570 acquires images as it travels through itsfull range of motion. When the motion is complete, camera images of theline are analyzed and the narrowest portion is determined. The lensposition at the moment the narrowest portion of the line was createdcorresponds to the point where the beam is in focus, and the moment atwhich the distance between the lens 570 and the material equals thefocal length of the lens, allowing both the laser to be focused and thedistance to be determined for other purposes, such as reporting thethickness (measured from the height of the material surface) to theuser.

Direct Inspection of Material Thickness

In another implementation, the material 140 can be imaged by a camera ata low angle relative to the surface of the material. The angle can be,for example, 0 degrees (parallel to the surface), less than 5 degrees,less than 10 degrees, etc. This “edge-on” view allows a directdetermination of the height of the material. Here, an image of thematerial can be acquired. The height or thickness of the material 140 isrelated to the number of pixels of the material in the image. In someimplementations, a distance measurement between the camera and the edgeof the material can first be performed. Based on the distance from thecamera to the edge which is being imaged, a conversion can be performedbetween the height in pixels and the material height.

Position of the Head Camera

High-resolution cameras, such as the head camera 120, are typicallylocated offset from the path of the beam or other output of the head160. For example, the head camera 120 can be ahead, to the side, orbehind, the path of a cut. Imaging ahead of the cut can allowacquisition of images of the material 140 about to be cut. These images,taken prior to the cut, can provide an updated characterization ofdebris, smoke, material 140 defects, distance, etc. Similarly, imagingat the point of a cut can allow a real-time feed of image data that canbe used to dynamically update the motion plan or provide diagnostic dataabout the progress of the cut or the operation of the head 160. Finally,imaging a region after a cut is complete can provide image data aboutthe conditions in the output volume immediately after processing.Further imaging after the cut can diagnose conditions after, forexample, fans have removed debris or smoke from the cut area. In oneimplementation, such as for a laser cutter, the head camera 120 can bealigned with the laser output. For example, in FIG. 11 the head camera120 can be above the mirror 360 (assuming the mirror 360 transmits somelight through its surface) and the central imaging line from the headcamera 120 can look directly into the cut through the lens 370 andwindow 380.

More complex motion solutions can also be used. The camera could bemounted on a multi-axis arm, a pan/tilt head 160, an X-Y gantry of itsown, or any other motion configuration. Taking the opposite approach, aconstellation of preset cameras can be placed around the head 160, withonly the cameras closest to the areas of interest activated or utilized.

High-Resolution Cut Images

FIG. 17 is a diagram illustrating a camera imaging details of a cut madeby the CNC machine 100, consistent with some implementations of thecurrent subject matter. As mentioned previously with regard to FIG. 3,there can be cameras that provide high-resolution images of portions ofthe CNC machine 100, the material 140, etc. One example of such a cameracan be the head camera 120, which can be used to provide high-resolutionimages of a cut and the area proximate to the cut. While the earlierdiscussion focused on the high-resolution cameras aiding with featuresthat generally impacted the CNC machine 100 operation as a whole, thefollowing discussion generally relates to features enabled by detailedimaging of the cut. Again, while such features are described with regardto a laser cutter, many of the features can be similarly applied to a3-D printer, inkjet printer, draw knife, etc.

One example of a through-cut is shown in FIG. 17. Here, there is a cut,which extends entirely through the material 140, and also, in thisexample, there is debris present in the area surrounding the cut. Thecamera, in this case the head camera 120, can image the output volume330 (the cut) and the peripheral volume 340 (the debris). Because thehead camera 120 is closer to the cut than other cameras, the finedetails of the cut and the debris can be used for more precise imagerecognition techniques.

Implementation of High-Resolution Camera Images

At any time, and also prior to the cut, high-resolution images canenable, for example, detection of the position and motion of the head160, calibration of the CNC machine 100, measuring distance to thematerial 140 surface, tracing of markings imaged by the cameras, kerfmeasurements, identification of registration marks for double-sided orpass-through cutting, and varying the cut depth. Also at any time, butin particular during the cutting process, cut verification can beperformed, errors in output can be detected, inspecting unusual CNCmachine 100 behavior, and compensating for hysteresis. These featuresare discussed in greater detail below.

Pass-Through Cutting

FIG. 18 is a diagram illustrating the lid camera 110 imagingregistration marks 1820 on an oversized material 1810, consistent withsome implementations of the current subject matter. In oneimplementation, oversized material 710, which can extend beyond theenclosure in one or more directions, can be inserted into the CNCmachine 100. This can allow a large pattern to be cut on the oversizedmaterial 710, one section at a time. For example, the CNC machine 100can cut one end, and then instruct the user to move the oversizedmaterial 710, and then cut the next section, and so on. The CNC machine100 can indicate to the user how far to move the oversized material1810, and/or use indicators to indicate when the oversized material 1810is too far or at the right location.

The CNC machine 100 can include a pass-through slot 1830 that can allowthe oversized material 1810 to be fed through the CNC machine 100 forprocessing. The pass-through slot 1830 can be substantially aligned withthe material bed 150 for holding the oversized material 1810. Forexample, the bottom of the pass-through slot 1830 can be at the sameheight as the top of the material bed 150 so that the oversized material1810 doesn't tilt as it is fed into the CNC machine 100. Thepass-through slot 1830 can be integrated with passive or motorizedrollers, treads, etc. If motorized, the rollers can be coordinated withthe motion plan to advance the oversized material 1810 at specifiedtimes and rates. If a motorized feed section is present, then the lasercan omit some or all Y axis travel and rely solely on the feed mechanismto move the laser relative to the material in the Y axis. Material feedcan also allow motion of the oversized material 1810 in both X and Y,for example to maintain alignment. Optionally, the head 160 can moveindependently from the oversized material 1810, or the head 160 can bestationary with the oversized material 1810 moving by material feed. Thecameras can track 220 the material 140 as it proceeds through thepass-through slot to verify the oversized material 1810 position orotherwise monitor progress during material feed. The cameras, forexample the lid camera, can be used to maintain alignment as theoversized material 1810 moves relative to the laser, cutting tool, orother processing head 160.

The positioning of the material, oversized or otherwise, can bespecified by a user, or automatically with the cameras and imagerecognition system. In some implementations, this can be performed by animage of the material 140 being generated on a computer screen. The usercan interact with the image by indicating corners, selecting or tracingboundaries, etc. The interaction can be with a touch-screen interface,mouse clicks selecting positions on the screen that map to the materialreference points, etc. In another implementation, the software candetermine corners by identifying, from image data of the material,corners of arbitrary angle, for example, approximately 90, 75, 60, 45,or 30 degrees. Recognition of standard shapes, such as polygons,circles, ellipses, can also be identified either in association with thepass-through cutting features described herein or during any otherprocesses executed by the CNC machine 100. In any implementation, imagesfrom the head camera 120 and the lid camera 110 can be combined to findany of the edges or corners of the material 140. For example, the lidcamera 110 can find the locations roughly and the head camera 120 canprovide a higher-resolution image for a more precise estimate. Fiducialmarks can be cut at any time to provide reference points when acquiringor re-acquiring position of the material 140. For example, fiducialmarks can be cut in scrap regions of the material 140. These fiducialmarks can be printed out on adhesive paper that can be provided prior toa cut, and then imaged during the cutting process to provideregistration. Optionally, the fiducials or other registration patternscan be repeated over a substantial portion of the adhesive paper orsurface of the material 140. Markings used for other purposes, forexample bar codes for material identification, can also be used asfiducials.

In some implementations, tracking the material 140 or re-acquisition ofa cut after a shift or material 140 feed can be enabled by the cameraslocating reference features on the material 140. Reference features caninclude, for example, features of the material such as wood grain,previous cuts that are either part of the assembly-process or made usingthe laser specifically for registration, removable adhesive-backed paperplaced on the material 140 to serve as a temporary reference point, etc.To identify motion and rotation of the material through the pass-throughslots, cameras can identify marks that are present on the material suchas grain structure in wood, natural edges in the material such ascorners, marks that are applied to the material such as fiducial marksthat are drawn on, marks that are on the material for other purposessuch as identification barcodes, and/or marks that are created by themachine itself such as cut lines from a previous machining pass. Thecameras can image the reference features during the machining processand adjust the motion plan based on shifts, rotations, or the like, ofthe reference features. One example can be placing a sticker with across on a piece of material 140. If, during machining, the imagerecognition program determines that the cross rotates 10 degrees, thenthe motion plan can be recalculated to include compensation for the 10degree rotation in order to correctly complete the cut. These featurescan also be applied to machining the oversized material 1810.

Because, in some implementations, the CNC machine 100 can be a lasercutter, the feed of material into or out of the CNC machine 100 canprovide an opening for light to escape. For the safety of users, andalso to reduce the transfer of contaminates either in or out of the CNCmachine 100, there can be one or more light curtains on the CNC machine100. The light curtains can allow material to go in or out of the CNCmachine while keeping a barrier between the inside of the CNC machine100 where the laser is and the outside. The light curtain can be, forexample, a rigid flap mounted with springs, or on a vertical orhorizontal track. The light curtain can also include flexible materialsthat can bend to allow entrance or egress. There can be nested layers oflight curtains for additional protection.

Double-Sided Cutting

FIG. 18 is a diagram illustrating imaging features of the material 140to implement double sided cutting, consistent with some implementationsof the current subject matter. FIG. 19 is a diagram illustratingreferencing the imaged features of the material 140 to complete adouble-sided cut, consistent with some implementations of the currentsubject matter.

The thicker material is, the more power is required to cut it. Forexample, a 40 Watt laser may be able to pierce ¼″ of maple wood, but nothicker. By flipping the material 140 over, ¼″ of thickness may be cutin each side, meaning that material 140 up to ½″ thick may be processed.The challenge with double sided cutting is alignment: the cuts must beprecisely aligned so that they combine to fully penetrate the material140.

Image recognition can be advantageously used to improve such a process,for example by instructing the user to flip the material 140 along aknown axis and then finding the corners again to align the subsequentcuts. The cameras can detect distinctive features of the material 140,like an irregular edge, a cut through the material 140, corners, edges,and the like, and observe those features when the material 140 isreversed. Though described with regard to double-sided cutting, thesefeatures can also be used for double-sided engraving. For example,having an engraved pattern occur in a desired location and/ororientation on both sides of the material 140.

Double-sided cutting can be used with, or independently of, thepass-through features described above. Here, a cut 1810 is performed onone side of the material 140 (as shown in FIG. 18) and then the user, oran automated system, receives an instruction or prompt to flip thematerial 140 over. Once flipped, the cameras can reacquire referencefeatures, corners, registration marks, cut points, or the like, in amanner similar to that described above with regard to pass-throughcutting. As shown in FIG. 19, once the material 140 is referenced, theCNC machine 100 can execute instructions to finish the cut 1910 on theother side of the material 140 in the proper location.

Detecting Features For Double-Sided or Pass-Through Cutting or toAccount for Material Re-Positioning

The cameras can acquire images (which can be high-resolution images) ofone or more features of the material (e.g. registration marks, fiducialmarks, previously made cuts or other visible changes to the material)that can be used with, for example, double-sided cutting or pass-throughcutting. Imaging of such features using one or more cameras presentinside the interior space of the CNC machine can be used to update aposition of the material. In other words, the CNC machine 100 canacquire, or re-acquire, the position and orientation of a material 140after it has been moved either deliberately or inadvertently (e.g. dueto the CNC machine being bumped, a user reaching into the interior spaceand accidentally bumping the material, etc.). The features (which can bebut are not limited to registration marks as noted above) can beexisting cuts or engravings or other changes caused to the materialthrough the delivery of electromagnetic radiation (e.g. via a moveablehead of the CNC machine 100), marks made by a user, registration marksmade by the CNC machine 100, fiducial marks made by the CNC machine orotherwise present on the material, one or more corners of the material,one or more edges of the material, one or more holes in the material,etc. While images of the features can be acquired by any camera in theCNC machine 100, in some implementations they can be acquired first by awide angle and lower resolution camera (e.g. a camera mounted to a lidor other openable barrier) to locate their approximate position, andthen again by narrower view, moveable cameras for example the headcamera 120 or some other camera that can be moved within the interiorspace (e.g. on a robotic arm, etc.). High-resolution imaging can havethe advantage that the registration marks may be smaller than those thatwould be usably detectable by a lower-resolution or farther-distantcamera.

In some implementations of the current subject matter, the imaging ofthe material can include more than one image being captured. Forexample, a first image can be captured by one or more cameras and, basedon information obtained from the first image a controller or processorcan determine that a second image is needed to properly characterize thematerial, its position, etc.

In a more specific implementation, the first image in the second imagecan be captured by two different cameras: a first camera and a secondcamera. In this example, the first camera can be a wide view camera, forexample a camera mounted on the housing of the CNC machine and/or on inopenable barrier of the CNC machine. Based on information from an imageproduced by this first camera, the controller or processor can direct amovable second camera to capture an additional image, perhaps from acloser point of view. In an example in which the second camera is acamera mounted on the movable head of the CNC machine, the controller orprocessor can cause movement of the movable head to an area near orabove a feature that was first imaged by the first camera. As the cameramounted to the movable head may have a higher resolution, or at leastmay be positioned closer to the feature, the second image can includemore detailed information about the feature, thereby allowing a moreaccurate determination of a proper alignment of the movable head todeliver additional electromagnetic energy to make further changes in thematerial.

Concurrent Cutting and Thickness Measurement

Any of the techniques described herein for measuring the height of thesurface 150 can be performed either before or while cutting or engravingthe material 140. For example, a distance finding laser can be directedat, or proximate to, the cutting location in order to determine thematerial 140 thickness at the cutting point. Most material 140 initiallyused in a CNC machine 100 is flat or has a flat surface exposed to thelaser. However, if the material 140 is not flat, or has been partiallyengraved and exhibits features of varying depth on the surface, thenmeasuring the local thickness, while executing a cut, can result in amore accurate cut. As another example, material 140 with internalstresses may spring upwards when cut, or cut pieces may drop downwardsfrom warped material 140, changing the focal distance required to makean accurate cut. With a known offset between the measurement point andthe intended engraving depth, the motion plan can take into account themeasured height that was engraved and adjust the laser outputaccordingly. Changes to the output can be effected by, for example,moving the head, moving a component in the head, or moving the material140. The head, while generally confined to a plane parallel to thematerial 140, can in some implementations move vertically. Components inthe head can also be moved, for example moving a lens to vary thedistance between the focal point of the lens and the material 140. Thematerial 140 can also move by, for example, material feed, translationor rotation of the material 140, manipulation of the material 140 by arobotic arm, etc.

In another implementation, there can also be a measurement of thethickness after engraving or cutting, which can be used to diagnoseerrors in the laser operation, material 140 irregularities that were notknown before the cut, etc. The measurement can be performed by obtaininga thickness measurement of the material 140 in a location that haspreviously been cut or engraved. While it can be advantageous to performthe thickness measurements immediately before and/or after the cut, thethickness measurements can be obtained at any time. Once obtained, themeasurements can be compared to the motion plan in order to determinewhether the chosen speed and power parameters resulted in the desiredamount of material 140 removal or to adjust the motion plan ahead of thenext pass over the material 140.

Variable Cut Depth

Because the distance between the head 160 and the material 140 isgenerally fixed, there are a limited number of ways in which cuts ofdifferent depth can be made. Three ways of varying the depth of a cutcan be, for example, (i) varying the laser power, (ii) reducing thespeed with which the laser moves, (iii) varying the focal length of thelaser, and (iv) a combination of these.

By varying the laser power, for a given dwell time at a particularlocation, the depth of the cut can be varied. For example, to a simpleapproximation, if the laser power is doubled, then in a given timeperiod, twice as much material 140 can be expected to be ablated duringthe cut. There can be factors which complicate this kind of simpleapproximation, for example, debris, material 140, etc. One complicatingfactor is that the power density drops off with distance beyond thefocal point, as the deeper material 140 is farther from the lens andthus out of focus.

The focal length of the laser can also be varied in order to provide aconstant, or known, power density at a surface with varying height. Thefocal length of the laser can be varied by adjusting focusing opticsinside the head 160 to provide a cut specified by the motion plan. Also,the cameras can monitor a laser's spot size, either the primary cuttinglaser or a secondary one, as described above, to maintain a specifiedfocal distance for the most precise cutting. Alternatively, the camerascan monitor the spot size during the cut as a measure of the depth ofthe cut. For example, if it is known that at the focal length a cut wasto have a certain depth than the cameras could monitor the spot size todetect that the spot size is reached the expected size given the focallength. Once the spot size is the expected size, then it is known thatthe cut is a depth defined, in part, by the focal length.

Because the laser power and focal length are generally independentparameters in laser operation, they can be varied together to widen theoperating space of the CNC machine 100. In a simple approach withoutfeedback, a first pass may be engraved to a depth of 1 mm by focusingthe laser on the surface of the material 140. Then a second pass couldbe taken removing another 1 mm, this time focusing the lens 1 mm lowerat the new top surface of the material 140. In an iterative approachwith feedback, there can be multiple passes by the head 160 and aftereach pass the depth of the cut can be measured by the cameras. The CNCmachine 100 can then use the measured change in the material tocalculate what combination of power variation and focal length settingsare used for the next pass. The calculation can be optimized for thetype of material 140, cut time, laser power limits, etc. In oneimplementation, the average power output of the laser can be set to bebelow a predefined value. The duty cycle of the laser can be varied toprovide alternating periods of the laser being on or off. In oneimplementation, the duty cycle of the laser can be varied in order toachieve the desired average power output.

Cut Verification

The optical system can image the cut and compare the images with thoseexpected from a cut made on a material 140 with known material 140properties. The comparison can then be used to determine laser power (orother cutting parameter). The comparison can be based on image features(lightness/darkness of engraving), a through cut that should have beenan engraving, etc. Alignment can be confirmed by cutting a pattern thatshould have a particular shape, imaging the cut, and comparing it to anexpected image. The motion plan can be updated to correct for anydiscrepancies and an alert can be sent to a user or other connectedcomputing system that maintenance of the CNC machine 100 is required.Also, calibration cuts can be used to align one or more elements of theoptical system. For example, making a cut pattern of a predefined sizeand adjusting one or more optical elements to confirm that thefield-of-vision of the optical element conforms to the cut pattern.

A cut pattern can be designated to go onto imaged portions of thematerial 140 based on imaged features of the material 140. Thedesignation can be made by user-input or according to pre-definedinstructions. For example, the cameras can determine separate material140 s, colors, textures, etc. present on one or more materials in theCNC machine 100. The motion plan can associate the cut pattern with aparticular material 140 or portion of the material 140 based on theimaged features. Once associated, the cut pattern can be executed on theidentified portion of the material 140. This can allow, for example, auser to specify a particular cut to go on only certain color portions ofa material 140, etc.

Kerf Measurements

Cutting or milling CNC machines remove some material 140 when they cut.The width of the material 140 removed is called the kerf. CNC mills havea kerf that depends on the bit used. Lasers have a very small kerf, onthe order of 0.01 inches, but the precise kerf depends on the lasertube, material 140, speed, power setting, environment, and otherfactors. The width of the kerf also varies from the top of the cut tothe bottom, as most cuts are V-shaped with the wider edge towards thelaser.

Understanding the dimensions of the kerf is critical to creatingaccurately fitting pieces. For example, to create a tab and slot, theslot must be reduced in size by half the amount of the kerf, and the tabincreased by the same amount. Alternately one can be unchanged and theother can be modified twice as much.

Kerf may be asymmetric, with a wider or narrower kerf for horizontalthan vertical. It can also change over the course of a cut, for exampleif the wood has a knot in it.

Using the cameras to measure the kerf can allow mating parts to becreated that fit properly, enabling easier construction of final partsand the creation of 3D structures that would otherwise be impractical orrequire secondary fasteners to hold together.

To assist with kerf measurement, several techniques can be utilized. Thecamera can be maneuvered directly over the kerf, as described above. Thekerf can be illuminated from below with lighting for the purpose, forexample diffuse lighting from below the material 140 or targetedlighting e.g. a focused light or laser pointed at the underside of thematerial 140 at the location being measured. The kerf can also bemeasured with a camera from below, looking up at the underside of thematerial 140. Supplemental lighting on above the material 140 can beused to help make it obvious when the laser has penetrated the material140, or light emitted from the laser interacting with smoke particlesmay also serve as illumination.

In one important special case of kerf measurement, the camera may detectthat the material 140 was incompletely cut and that some material 140remains—a zero kerf measurement. In this case, the laser may revisit thearea to ensure it cuts fully, and the laser power increased for futurecutting to compensate.

As a general technique, it is possible to revisit areas to modify thekerf. If the kerf varies, a small amount of additional material 140 canbe removed in a subsequent path to ensure it is consistent. In a relatedtechnique, the focus of the beam may be adjusted to remove the lowerportion of the kerf, reducing the characteristic V-shape.

Multicolor Engraving

FIG. 21 is a diagram illustrating varying cut depths to generate a colorpattern in a multi-layered material 2110. In one implementation,materials of different color can be layered and cut to a predefineddepth to expose a particular color. For example, there can be layerscorresponding to the CMYK color model with the layers being cyan,magenta, yellow, and black. Small cuts, or even just spots, can be madeto a prescribed depth corresponding to one of the layers by varyingpower, duration of laser exposure, and focus. The depth and density ofthe cuts can provide a pattern on the material 140 that represents anycolor combination. Additionally, the cameras, for example the headcamera 120, can monitor the exposed colors in order to verify that thecuts are at the depth specified by the motion plan. In the example shownwith FIG. 17, the there is a yellow layer 2120, a cyan layer 2130, amagenta layer 2140, and a black layer 2150. Two cuts are shown, one toexpose the cyan surface and one to expose the magenta surface. The cutscan be made to form a dot matrix pattern to generate what, at adistance, appears to be a continuous color blend. Other cuts/engravingscan be made to expose a color at a particular depth. The inverse processcan also be implemented where the cut proceeds until a certain color isexposed, at which time the cut stops. This can provide one method ofcutting to a prescribed depth without a priori knowledge of the cuttingparameters (power, duration, etc.) to reach the prescribed depth.

FIG. 22 is a process flow chart illustrating features of a methodconsistent with implementations of the current subject matter. At 2210,electromagnetic energy sufficient to cause a first change in a materialat least partially contained within an interior space of a computernumerically controlled machine can be delivered via a moveable head ofthe computer numerically controlled machine. A feature of the materialis imaged at 2220 using at least one camera present inside the interiorspace to update a position of the material, and at 2230 the moveablehead is aligned to deliver electromagnetic energy sufficient to cause asecond change in the material such that the second change is positionedon the material consistent with the first change and with an intendedfinal appearance of the material.

One or more aspects or features of the subject matter described hereincan be realized in digital electronic circuitry, integrated circuitry,specially designed application specific integrated circuits (ASICs),field programmable gate arrays (FPGAs) computer hardware, firmware,software, and/or combinations thereof. These various aspects or featurescan include implementation in one or more computer programs that areexecutable and/or interpretable on a programmable system including atleast one programmable processor, which can be special or generalpurpose, coupled to receive data and instructions from, and to transmitdata and instructions to, a storage system, at least one input device,and at least one output device. The programmable system or computingsystem may include clients and servers. A client and server aregenerally remote from each other and typically interact through acommunication network. The relationship of client and server arises byvirtue of computer programs running on the respective computers andhaving a client-server relationship to each other.

These computer programs, which can also be referred to programs,software, software applications, applications, components, or code,include machine instructions for a programmable processor, and can beimplemented in a high-level procedural language, an object-orientedprogramming language, a functional programming language, a logicalprogramming language, and/or in assembly/machine language. As usedherein, the term “machine-readable medium” refers to any computerprogram product, apparatus and/or device, such as for example magneticdiscs, optical disks, memory, and Programmable Logic Devices (PLDs),used to provide machine instructions and/or data to a programmableprocessor, including a machine-readable medium that receives machineinstructions as a machine-readable signal. The term “machine-readablesignal” refers to any signal used to provide machine instructions and/ordata to a programmable processor. The machine-readable medium can storesuch machine instructions non-transitorily, such as for example as woulda non-transient solid-state memory or a magnetic hard drive or anyequivalent storage medium. The machine-readable medium can alternativelyor additionally store such machine instructions in a transient manner,such as for example as would a processor cache or other random accessmemory associated with one or more physical processor cores.

To provide for interaction with a user, one or more aspects or featuresof the subject matter described herein can be implemented on a computerhaving a display device, such as for example a cathode ray tube (CRT) ora liquid crystal display (LCD) or a light emitting diode (LED) monitorfor displaying information to the user and a keyboard and a pointingdevice, such as for example a mouse or a trackball, by which the usermay provide input to the computer. Other kinds of devices can be used toprovide for interaction with a user as well. For example, feedbackprovided to the user can be any form of sensory feedback, such as forexample visual feedback, auditory feedback, or tactile feedback; andinput from the user may be received in any form, including, but notlimited to, acoustic, speech, or tactile input. Other possible inputdevices include, but are not limited to, touch screens or othertouch-sensitive devices such as single or multi-point resistive orcapacitive trackpads, voice recognition hardware and software, opticalscanners, optical pointers, digital image capture devices and associatedinterpretation software, and the like.

In the descriptions above and in the claims, phrases such as “at leastone of” or “one or more of” may occur followed by a conjunctive list ofelements or features. The term “and/or” may also occur in a list of twoor more elements or features. Unless otherwise implicitly or explicitlycontradicted by the context in which it used, such a phrase is intendedto mean any of the listed elements or features individually or any ofthe recited elements or features in combination with any of the otherrecited elements or features. For example, the phrases “at least one ofA and B;” “one or more of A and B;” and “A and/or B” are each intendedto mean “A alone, B alone, or A and B together.” A similarinterpretation is also intended for lists including three or more items.For example, the phrases “at least one of A, B, and C;” “one or more ofA, B, and C;” and “A, B, and/or C” are each intended to mean “A alone, Balone, C alone, A and B together, A and C together, B and C together, orA and B and C together.” Use of the term “based on,” above and in theclaims is intended to mean, “based at least in part on,” such that anunrecited feature or element is also permissible.

The subject matter described herein can be embodied in systems,apparatus, methods, and/or articles depending on the desiredconfiguration. The implementations set forth in the foregoingdescription do not represent all implementations consistent with thesubject matter described herein. Instead, they are merely some examplesconsistent with aspects related to the described subject matter.Although a few variations have been described in detail above, othermodifications or additions are possible. In particular, further featuresand/or variations can be provided in addition to those set forth herein.For example, the implementations described above can be directed tovarious combinations and subcombinations of the disclosed featuresand/or combinations and subcombinations of several further featuresdisclosed above. In addition, the logic flows depicted in theaccompanying figures and/or described herein do not necessarily requirethe particular order shown, or sequential order, to achieve desirableresults. Other implementations may be within the scope of the followingclaims.

What is claimed is:
 1. A method comprising: delivering, via a moveablehead of a computer numerically controlled machine, electromagneticenergy sufficient to cause a first change in a material at leastpartially contained within an interior space of the computer numericallycontrolled machine; imaging a feature of the material using at least onecamera present inside the interior space to update a position of thematerial; and aligning the moveable head to deliver electromagneticenergy sufficient to cause a second change in the material such that thesecond change is positioned on the material consistent with the firstchange and with an intended final appearance of the material.
 2. Amethod as in claim 1, wherein the feature comprises the first change. 3.A method as in claim 1, wherein the feature comprises an aspect of anappearance of the material prior to the first change.
 4. A method as inclaim 3, wherein the feature comprises a corner of, a hole in, and/or anedge of the material.
 5. A method as in claim 3, wherein the featurecomprises a fiducial mark made on the material.
 6. A method as in anypreceding claim, wherein the at least one camera comprises a cameramounted on the moveable head.
 7. A method as in any preceding claim,wherein the at least one camera comprises a camera not mounted on themoveable head.
 8. A method as in any preceding claim, wherein the atleast one camera comprises a camera mounted on an openable barrier of ahousing that at least partially defines the interior space.
 9. A methodas in any preceding claim, further comprising determining, based oninformation from the at least one camera, that at least one additionalimage of the material should be captured.
 10. A method as in anypreceding claim, wherein the different position results from anintentional movement of the material by a user and/or a deviceassociated with the computer numerically controlled machine.
 11. Amethod as in any preceding claim, further comprising moving the materialthrough a pass-through slot in a housing that at least partially definesthe interior volume.
 12. A method as in any preceding claim, wherein thedifferent position results from an unintentional movement of thematerial.
 13. A method as in claim 12, further comprising determiningthat the unintentional movement may have occurred based on data from oneor more sensors of the computer numerically controlled machine.
 14. Amethod as in any preceding claim, further comprising imaging thematerial a second time to capture the at least one additional image. 15.A method as in claim 14, wherein the at least one camera comprises afirst camera and a second camera, and wherein the imaging comprisesmoving the second camera to facilitate further imaging of the materialbased information from an image produced by the first camera.
 16. Amethod as in claim 15, wherein the image comprises a view of thefeature, and the further imaging comprises generating ahigher-resolution image and/or closer-up image of the feature.
 17. Amethod as in claim 16, wherein the feature comprises a corner of thematerial.
 18. A method as in any of claims 15 to 17 wherein the firstcamera is mounted on an openable barrier of a housing that at leastpartially defines the interior space, and the second camera is mountedon the moveable head.
 19. A computer numerically controlled machinecomprising: a moveable head inside an interior space of the computernumerically controlled machine, the moveable head configured to deliverelectromagnetic energy; at least one camera present inside the interiorspace; and a controller configured to perform operations comprising:causing the moveable head to deliver first electromagnetic energysufficient to cause a first change in a material at least partiallycontained within the interior space, commanding the at least one camerato image a feature of the material to update a position of the material;and causing alignment of the moveable head to deliver electromagneticenergy sufficient to cause a second change in the material such that thesecond change is positioned on the material consistent with the firstchange and with an intended final appearance of the material.
 20. Acomputer numerically controlled machine as in claim 19, wherein the atleast one camera comprises a camera mounted on the moveable head.
 21. Acomputer numerically controlled machine as in any of claims 19 to 20,wherein the at least one camera comprises a camera not mounted on themoveable head.
 22. A computer numerically controlled machine as in anyof claims 19 to 21, wherein the at least one camera comprises a cameramounted to an openable barrier of a housing that at least partiallydefines the interior volume.
 23. A computer numerically controlledmachine as in any of claims 19 to 22, wherein the operations furthercomprise determining, based on information from the at least one camera,that at least one additional image of the material should be captured.24. A computer numerically controlled machine as in any of claims 19 to23, further comprising a pass-through slot in a housing that at leastpartially defines the interior volume, the pass-through slot acceptingthe material at a size that cannot be completely enclosed within theinterior space and allowing changes to the position of the material tobe made.
 25. A computer numerically controlled machine as in any ofclaims 19 to 24, wherein the at least one camera comprises a firstcamera and a second camera, and wherein the commanding the at least onecamera comprises causing movement of the second camera to facilitatefurther imaging of the material based information from an image producedby the first camera.
 26. A computer numerically controlled machine as inclaim 25, wherein the first camera is mounted on an openable barrier ofa housing that at least partially defines the interior space, and thesecond camera is mounted on the moveable head.